wp/wp-admin/edit-comments.php
author ymh <ymh.work@gmail.com>
Mon, 14 Oct 2019 17:39:30 +0200
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
child 9 177826044cd9
permissions -rw-r--r--
resynchronize code repo with production
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
/**
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
 * Edit Comments Administration Screen.
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
 *
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
 * @package WordPress
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
 * @subpackage Administration
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
 */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
/** WordPress Administration Bootstrap */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
require_once( dirname( __FILE__ ) . '/admin.php' );
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    11
if ( ! current_user_can( 'edit_posts' ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    12
	wp_die(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    13
		'<h1>' . __( 'You need a higher level of permission.' ) . '</h1>' .
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    14
		'<p>' . __( 'Sorry, you are not allowed to edit comments.' ) . '</p>',
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    15
		403
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    16
	);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    17
}
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
$wp_list_table = _get_list_table('WP_Comments_List_Table');
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
$pagenum = $wp_list_table->get_pagenum();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
$doaction = $wp_list_table->current_action();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
if ( $doaction ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
	check_admin_referer( 'bulk-comments' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
	if ( 'delete_all' == $doaction && !empty( $_REQUEST['pagegen_timestamp'] ) ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
		$comment_status = wp_unslash( $_REQUEST['comment_status'] );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
		$delete_time = wp_unslash( $_REQUEST['pagegen_timestamp'] );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
		$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 ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
		$doaction = 'delete';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
	} elseif ( isset( $_REQUEST['delete_comments'] ) ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
		$comment_ids = $_REQUEST['delete_comments'];
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
		$doaction = ( $_REQUEST['action'] != -1 ) ? $_REQUEST['action'] : $_REQUEST['action2'];
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
	} elseif ( isset( $_REQUEST['ids'] ) ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
		$comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
	} elseif ( wp_get_referer() ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
		wp_safe_redirect( wp_get_referer() );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
		exit;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
	}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
	$approved = $unapproved = $spammed = $unspammed = $trashed = $untrashed = $deleted = 0;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
	$redirect_to = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'spammed', 'unspammed', 'approved', 'unapproved', 'ids' ), wp_get_referer() );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
	$redirect_to = add_query_arg( 'paged', $pagenum, $redirect_to );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    47
	wp_defer_comment_counting( true );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    48
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
	foreach ( $comment_ids as $comment_id ) { // Check the permissions on each
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
		if ( !current_user_can( 'edit_comment', $comment_id ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
			continue;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
		switch ( $doaction ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
			case 'approve' :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
				wp_set_comment_status( $comment_id, 'approve' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
				$approved++;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
				break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
			case 'unapprove' :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
				wp_set_comment_status( $comment_id, 'hold' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
				$unapproved++;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
				break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
			case 'spam' :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
				wp_spam_comment( $comment_id );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
				$spammed++;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
				break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
			case 'unspam' :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
				wp_unspam_comment( $comment_id );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
				$unspammed++;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
				break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
			case 'trash' :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
				wp_trash_comment( $comment_id );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
				$trashed++;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
				break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
			case 'untrash' :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
				wp_untrash_comment( $comment_id );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
				$untrashed++;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
				break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
			case 'delete' :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
				wp_delete_comment( $comment_id );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
				$deleted++;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
				break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
		}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
	}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    85
	if ( ! in_array( $doaction, array( 'approve', 'unapprove', 'spam', 'unspam', 'trash', 'delete' ), true ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    86
		$screen = get_current_screen()->id;
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    87
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    88
		/**
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    89
		 * Fires when a custom bulk action should be handled.
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    90
		 *
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    91
		 * The redirect link should be modified with success or failure feedback
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    92
		 * from the action to be used to display feedback to the user.
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    93
		 *
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    94
		 * The dynamic portion of the hook name, `$screen`, refers to the current screen ID.
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    95
		 *
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    96
		 * @since 4.7.0
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    97
		 *
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    98
		 * @param string $redirect_url The redirect URL.
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
    99
		 * @param string $doaction     The action being taken.
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   100
		 * @param array  $items        The items to take the action on.
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   101
		 */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   102
		$redirect_to = apply_filters( "handle_bulk_actions-{$screen}", $redirect_to, $doaction, $comment_ids );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   103
	}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   104
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   105
	wp_defer_comment_counting( false );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   106
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
	if ( $approved )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
		$redirect_to = add_query_arg( 'approved', $approved, $redirect_to );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
	if ( $unapproved )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
		$redirect_to = add_query_arg( 'unapproved', $unapproved, $redirect_to );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
	if ( $spammed )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
		$redirect_to = add_query_arg( 'spammed', $spammed, $redirect_to );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
	if ( $unspammed )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
		$redirect_to = add_query_arg( 'unspammed', $unspammed, $redirect_to );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
	if ( $trashed )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
		$redirect_to = add_query_arg( 'trashed', $trashed, $redirect_to );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
	if ( $untrashed )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
		$redirect_to = add_query_arg( 'untrashed', $untrashed, $redirect_to );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
	if ( $deleted )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
		$redirect_to = add_query_arg( 'deleted', $deleted, $redirect_to );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
	if ( $trashed || $spammed )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
		$redirect_to = add_query_arg( 'ids', join( ',', $comment_ids ), $redirect_to );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
	wp_safe_redirect( $redirect_to );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
	exit;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
	 wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
	 exit;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
$wp_list_table->prepare_items();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
wp_enqueue_script('admin-comments');
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
enqueue_comment_hotkeys_js();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   136
if ( $post_id ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   137
	$comments_count = wp_count_comments( $post_id );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   138
	$draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '&hellip;' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   139
	if ( $comments_count->moderated > 0 ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   140
		/* translators: 1: comments count 2: post title */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   141
		$title = sprintf( __( 'Comments (%1$s) on &#8220;%2$s&#8221;' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   142
			number_format_i18n( $comments_count->moderated ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   143
			$draft_or_post_title
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   144
		);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   145
	} else {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   146
		/* translators: %s: post title */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   147
		$title = sprintf( __( 'Comments on &#8220;%s&#8221;' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   148
			$draft_or_post_title
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   149
		);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   150
	}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   151
} else {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   152
	$comments_count = wp_count_comments();
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   153
	if ( $comments_count->moderated > 0 ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   154
		/* translators: %s: comments count */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   155
		$title = sprintf( __( 'Comments (%s)' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   156
			number_format_i18n( $comments_count->moderated )
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   157
		);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   158
	} else {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   159
		$title = __( 'Comments' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   160
	}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   161
}
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   163
add_screen_option( 'per_page' );
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   164
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   165
get_current_screen()->add_help_tab( array(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   166
'id'		=> 'overview',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   167
'title'		=> __('Overview'),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
'content'	=>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   169
	'<p>' . __( 'You can manage comments made on your site similar to the way you manage posts and other content. This screen is customizable in the same ways as other management screens, and you can act on comments using the on-hover action links or the Bulk Actions.' ) . '</p>'
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   170
) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   171
get_current_screen()->add_help_tab( array(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
'id'		=> 'moderating-comments',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   173
'title'		=> __('Moderating Comments'),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   174
'content'	=>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   175
		'<p>' . __( 'A red bar on the left means the comment is waiting for you to moderate it.' ) . '</p>' .
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   176
		'<p>' . __( 'In the <strong>Author</strong> column, in addition to the author&#8217;s name, email address, and blog URL, the commenter&#8217;s IP address is shown. Clicking on this link will show you all the comments made from this IP address.' ) . '</p>' .
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   177
		'<p>' . __( 'In the <strong>Comment</strong> column, hovering over any comment gives you options to approve, reply (and approve), quick edit, edit, spam mark, or trash that comment.' ) . '</p>' .
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   178
		'<p>' . __( 'In the <strong>In Response To</strong> column, there are three elements. The text is the name of the post that inspired the comment, and links to the post editor for that entry. The View Post link leads to that post on your live site. The small bubble with the number in it shows the number of approved comments that post has received. If there are pending comments, a red notification circle with the number of pending comments is displayed. Clicking the notification circle will filter the comments screen to show only pending comments on that post.' ) . '</p>' .
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   179
		'<p>' . __( 'In the <strong>Submitted On</strong> column, the date and time the comment was left on your site appears. Clicking on the date/time link will take you to that comment on your live site.' ) . '</p>' .
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
		'<p>' . __( 'Many people take advantage of keyboard shortcuts to moderate their comments more quickly. Use the link to the side to learn more.' ) . '</p>'
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   183
get_current_screen()->set_help_sidebar(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   184
	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   185
	'<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments">Documentation on Comments</a>' ) . '</p>' .
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   186
	'<p>' . __( '<a href="https://codex.wordpress.org/Comment_Spam">Documentation on Comment Spam</a>' ) . '</p>' .
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   187
	'<p>' . __( '<a href="https://codex.wordpress.org/Keyboard_Shortcuts">Documentation on Keyboard Shortcuts</a>' ) . '</p>' .
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   188
	'<p>' . __( '<a href="https://wordpress.org/support/">Support Forums</a>' ) . '</p>'
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   189
);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   190
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   191
get_current_screen()->set_screen_reader_content( array(
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   192
	'heading_views'      => __( 'Filter comments list' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   193
	'heading_pagination' => __( 'Comments list navigation' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   194
	'heading_list'       => __( 'Comments list' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   195
) );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   196
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   197
require_once( ABSPATH . 'wp-admin/admin-header.php' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   198
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   199
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   200
<div class="wrap">
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   201
<h1 class="wp-heading-inline"><?php
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   202
if ( $post_id ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   203
	/* translators: %s: link to post */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   204
	printf( __( 'Comments on &#8220;%s&#8221;' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   205
		sprintf( '<a href="%1$s">%2$s</a>',
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   206
			get_edit_post_link( $post_id ),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   207
			wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '&hellip;' )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   208
		)
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   209
	);
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   210
} else {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   211
	_e( 'Comments' );
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   212
}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   213
?></h1>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   214
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   215
<?php
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   216
if ( isset($_REQUEST['s']) && strlen( $_REQUEST['s'] ) ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   217
	echo '<span class="subtitle">';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   218
	/* translators: %s: search keywords */
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   219
	printf( __( 'Search results for &#8220;%s&#8221;' ),
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   220
		wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '&hellip;' )
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   221
	);
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   222
	echo '</span>';
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   223
}
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   224
?>
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   225
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   226
<hr class="wp-header-end">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   227
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   228
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   229
if ( isset( $_REQUEST['error'] ) ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   230
	$error = (int) $_REQUEST['error'];
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   231
	$error_msg = '';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   232
	switch ( $error ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   233
		case 1 :
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   234
			$error_msg = __( 'Invalid comment ID.' );
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   235
			break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   236
		case 2 :
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   237
			$error_msg = __( 'Sorry, you are not allowed to edit comments on this post.' );
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   238
			break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   239
	}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   240
	if ( $error_msg )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   241
		echo '<div id="moderated" class="error"><p>' . $error_msg . '</p></div>';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   242
}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   243
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   244
if ( isset($_REQUEST['approved']) || isset($_REQUEST['deleted']) || isset($_REQUEST['trashed']) || isset($_REQUEST['untrashed']) || isset($_REQUEST['spammed']) || isset($_REQUEST['unspammed']) || isset($_REQUEST['same']) ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   245
	$approved  = isset( $_REQUEST['approved']  ) ? (int) $_REQUEST['approved']  : 0;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   246
	$deleted   = isset( $_REQUEST['deleted']   ) ? (int) $_REQUEST['deleted']   : 0;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   247
	$trashed   = isset( $_REQUEST['trashed']   ) ? (int) $_REQUEST['trashed']   : 0;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   248
	$untrashed = isset( $_REQUEST['untrashed'] ) ? (int) $_REQUEST['untrashed'] : 0;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   249
	$spammed   = isset( $_REQUEST['spammed']   ) ? (int) $_REQUEST['spammed']   : 0;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   250
	$unspammed = isset( $_REQUEST['unspammed'] ) ? (int) $_REQUEST['unspammed'] : 0;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   251
	$same      = isset( $_REQUEST['same'] )      ? (int) $_REQUEST['same']      : 0;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   252
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   253
	if ( $approved > 0 || $deleted > 0 || $trashed > 0 || $untrashed > 0 || $spammed > 0 || $unspammed > 0 || $same > 0 ) {
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   254
		if ( $approved > 0 ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   255
			/* translators: %s: number of comments approved */
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   256
			$messages[] = sprintf( _n( '%s comment approved', '%s comments approved', $approved ), $approved );
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   257
		}
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   258
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   259
		if ( $spammed > 0 ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   260
			$ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0;
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   261
			/* translators: %s: number of comments marked as spam */
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   262
			$messages[] = sprintf( _n( '%s comment marked as spam.', '%s comments marked as spam.', $spammed ), $spammed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=unspam&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   263
		}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   264
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   265
		if ( $unspammed > 0 ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   266
			/* translators: %s: number of comments restored from the spam */
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   267
			$messages[] = sprintf( _n( '%s comment restored from the spam', '%s comments restored from the spam', $unspammed ), $unspammed );
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   268
		}
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   269
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   270
		if ( $trashed > 0 ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   271
			$ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0;
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   272
			/* translators: %s: number of comments moved to the Trash */
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   273
			$messages[] = sprintf( _n( '%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed ), $trashed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   274
		}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   275
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   276
		if ( $untrashed > 0 ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   277
			/* translators: %s: number of comments restored from the Trash */
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   278
			$messages[] = sprintf( _n( '%s comment restored from the Trash', '%s comments restored from the Trash', $untrashed ), $untrashed );
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   279
		}
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   280
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   281
		if ( $deleted > 0 ) {
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   282
			/* translators: %s: number of comments permanently deleted */
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   283
			$messages[] = sprintf( _n( '%s comment permanently deleted', '%s comments permanently deleted', $deleted ), $deleted );
7
cf61fcea0001 resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents: 5
diff changeset
   284
		}
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   285
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   286
		if ( $same > 0 && $comment = get_comment( $same ) ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   287
			switch ( $comment->comment_approved ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   288
				case '1' :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   289
					$messages[] = __('This comment is already approved.') . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   290
					break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   291
				case 'trash' :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   292
					$messages[] = __( 'This comment is already in the Trash.' ) . ' <a href="' . esc_url( admin_url( 'edit-comments.php?comment_status=trash' ) ) . '"> ' . __( 'View Trash' ) . '</a>';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   293
					break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   294
				case 'spam' :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   295
					$messages[] = __( 'This comment is already marked as spam.' ) . ' <a href="' . esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) . '">' . __( 'Edit comment' ) . '</a>';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   296
					break;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   297
			}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   298
		}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   299
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   300
		echo '<div id="moderated" class="updated notice is-dismissible"><p>' . implode( "<br/>\n", $messages ) . '</p></div>';
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   301
	}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   302
}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   303
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   304
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   305
<?php $wp_list_table->views(); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   306
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   307
<form id="comments-form" method="get">
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   308
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   309
<?php $wp_list_table->search_box( __( 'Search Comments' ), 'comment' ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   310
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   311
<?php if ( $post_id ) : ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   312
<input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   313
<?php endif; ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   314
<input type="hidden" name="comment_status" value="<?php echo esc_attr($comment_status); ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   315
<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr(current_time('mysql', 1)); ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   316
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   317
<input type="hidden" name="_total" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('total_items') ); ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   318
<input type="hidden" name="_per_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('per_page') ); ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   319
<input type="hidden" name="_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg('page') ); ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   320
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   321
<?php if ( isset($_REQUEST['paged']) ) { ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   322
	<input type="hidden" name="paged" value="<?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   323
<?php } ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   324
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   325
<?php $wp_list_table->display(); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   326
</form>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   327
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   328
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   329
<div id="ajax-response"></div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   330
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   331
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   332
wp_comment_reply('-1', true, 'detail');
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   333
wp_comment_trashnotice();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   334
include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>