diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index ba8924f1e0..28be5c9df9 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -25,6 +25,11 @@ if ( $doaction ) { check_admin_referer( 'bulk-comments' ); if ( 'delete_all' === $doaction && ! empty( $_REQUEST['pagegen_timestamp'] ) ) { + /** + * @global wpdb $wpdb WordPress database abstraction object. + */ + global $wpdb; + $comment_status = wp_unslash( $_REQUEST['comment_status'] ); $delete_time = wp_unslash( $_REQUEST['pagegen_timestamp'] ); $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = %s AND %s > comment_date_gmt", $comment_status, $delete_time ) ); @@ -135,6 +140,11 @@ $wp_list_table->prepare_items(); wp_enqueue_script( 'admin-comments' ); enqueue_comment_hotkeys_js(); +/** + * @global int $post_id + */ +global $post_id; + if ( $post_id ) { $comments_count = wp_count_comments( $post_id ); $draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' ); diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 654046c3d9..39bd35e769 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -10,6 +10,11 @@ if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } + +/** + * @global WP_Comment $comment Global comment object. + */ +global $comment; ?>