refactor(admin): consolidate duplicate configuration
Remove duplicate comment, captcha, filing, and website-security configuration paths. Move front submission verification to the captcha scene matrix and retire obsolete admin routes and components.
This commit is contained in:
@@ -454,6 +454,19 @@ if (!function_exists('aksrt_comments_render_form')) :
|
||||
? sanitize_text_field(wp_unslash((string) $_COOKIE['comment_author_email_' . COOKIEHASH]))
|
||||
: '';
|
||||
$placeholder = (string) $ctx['box_placeholder'];
|
||||
$post_id = (int) get_the_ID();
|
||||
$can_comment = function_exists('aksrt_user_can')
|
||||
? aksrt_user_can('comment_add', get_current_user_id(), $post_id)
|
||||
: $is_logged_in;
|
||||
|
||||
if (!$can_comment) {
|
||||
if (!$is_logged_in) {
|
||||
aksrt_comments_render_signarea($ctx);
|
||||
} else {
|
||||
echo '<p class="comments-permission-denied muted-2-color">' . esc_html__('当前账号没有发表评论的权限。', 'aksrt') . '</p>';
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (function_exists('aksrt_get_comment_virtual_input_html')) {
|
||||
echo aksrt_get_comment_virtual_input_html($placeholder, '#respond'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
Reference in New Issue
Block a user