X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0459461f9ea42e0b090759ff6fe5f48360bef750..refs/tags/wordpress-4.5:/wp-admin/includes/class-wp-comments-list-table.php diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index a7c6d869..a5f96939 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -499,7 +499,7 @@ class WP_Comments_List_Table extends WP_List_Table { $this->single_row_columns( $comment ); echo "\n"; - unset( $post, $comment ); + unset( $GLOBALS['post'], $GLOBALS['comment'] ); } /** @@ -510,9 +510,9 @@ class WP_Comments_List_Table extends WP_List_Table { * * @global string $comment_status Status for the current listed comments. * - * @param object $comment Comment being acted upon. - * @param string $column_name Current column name. - * @param string $primary Primary column name. + * @param WP_Comment $comment The comment object. + * @param string $column_name Current column name. + * @param string $primary Primary column name. * @return string|void Comment row actions output. */ protected function handle_row_actions( $comment, $column_name, $primary ) { @@ -556,37 +556,37 @@ class WP_Comments_List_Table extends WP_List_Table { // Not looking at all comments. if ( $comment_status && 'all' != $comment_status ) { if ( 'approved' === $the_comment_status ) { - $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; } elseif ( 'unapproved' === $the_comment_status ) { - $actions['approve'] = "" . __( 'Approve' ) . ''; + $actions['approve'] = "" . __( 'Approve' ) . ''; } } else { - $actions['approve'] = "" . __( 'Approve' ) . ''; - $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + $actions['approve'] = "" . __( 'Approve' ) . ''; + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; } if ( 'spam' !== $the_comment_status ) { - $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; + $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; } elseif ( 'spam' === $the_comment_status ) { - $actions['unspam'] = "" . _x( 'Not Spam', 'comment' ) . ''; + $actions['unspam'] = "" . _x( 'Not Spam', 'comment' ) . ''; } if ( 'trash' === $the_comment_status ) { - $actions['untrash'] = "" . __( 'Restore' ) . ''; + $actions['untrash'] = "" . __( 'Restore' ) . ''; } if ( 'spam' === $the_comment_status || 'trash' === $the_comment_status || !EMPTY_TRASH_DAYS ) { - $actions['delete'] = "" . __( 'Delete Permanently' ) . ''; + $actions['delete'] = "" . __( 'Delete Permanently' ) . ''; } else { - $actions['trash'] = "" . _x( 'Trash', 'verb' ) . ''; + $actions['trash'] = "" . _x( 'Trash', 'verb' ) . ''; } if ( 'spam' !== $the_comment_status && 'trash' !== $the_comment_status ) { - $actions['edit'] = "". __( 'Edit' ) . ''; + $actions['edit'] = "". __( 'Edit' ) . ''; - $format = '%s'; + $format = '%s'; - $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $comment->comment_post_ID, 'edit', 'vim-q comment-inline',esc_attr__( 'Edit this item inline' ), __( 'Quick Edit' ) ); + $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $comment->comment_post_ID, 'edit', 'vim-q comment-inline', esc_attr__( 'Quick edit this comment inline' ), __( 'Quick Edit' ) ); $actions['reply'] = sprintf( $format, $comment->comment_ID, $comment->comment_post_ID, 'replyto', 'vim-r comment-inline', esc_attr__( 'Reply to this comment' ), __( 'Reply' ) ); } @@ -621,7 +621,7 @@ class WP_Comments_List_Table extends WP_List_Table { /** * - * @param object $comment + * @param WP_Comment $comment The comment object. */ public function column_cb( $comment ) { if ( $this->user_can ) { ?> @@ -632,7 +632,7 @@ class WP_Comments_List_Table extends WP_List_Table { } /** - * @param object $comment + * @param WP_Comment $comment The comment object. */ public function column_comment( $comment ) { echo '
'; @@ -672,7 +672,7 @@ class WP_Comments_List_Table extends WP_List_Table { * * @global string $comment_status * - * @param object $comment + * @param WP_Comment $comment The comment object. */ public function column_author( $comment ) { global $comment_status; @@ -712,24 +712,36 @@ class WP_Comments_List_Table extends WP_List_Table { /** * @access public + * + * @param WP_Comment $comment The comment object. */ public function column_date( $comment ) { - echo '
'; - echo ''; /* translators: 1: comment date, 2: comment time */ - printf( __( '%1$s at %2$s' ), + $submitted = sprintf( __( '%1$s at %2$s' ), /* translators: comment date format. See http://php.net/date */ get_comment_date( __( 'Y/m/d' ), $comment ), - get_comment_date( get_option( 'time_format' ), $comment ) + get_comment_date( __( 'g:i a' ), $comment ) ); - echo ''; + + echo ''; } /** * @access public + * + * @param WP_Comment $comment The comment object. */ - public function column_response() { + public function column_response( $comment ) { $post = get_post(); if ( ! $post ) { @@ -765,8 +777,8 @@ class WP_Comments_List_Table extends WP_List_Table { /** * - * @param object $comment - * @param string $column_name + * @param WP_Comment $comment The comment object. + * @param string $column_name The custom column's name. */ public function column_default( $comment, $column_name ) { /**