Eliminate use of `extract()` in `WP_Post_Comments_List_Table::display()`. The method only needs to read `singular` from `$this->_args`. Extraction is unnecessary.
Eliminate use of `extract()` in `WP_Comments_List_Table::display()`. The method uses no variables. Extraction can be completely removed. See #22400. Built from https://develop.svn.wordpress.org/trunk@28385 git-svn-id: http://core.svn.wordpress.org/trunk@28213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4c60b2e207
commit
f617b8669a
|
@ -309,8 +309,6 @@ class WP_Comments_List_Table extends WP_List_Table {
|
|||
}
|
||||
|
||||
function display() {
|
||||
extract( $this->_args );
|
||||
|
||||
wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
|
||||
|
||||
$this->display_tablenav( 'top' );
|
||||
|
@ -598,13 +596,18 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
|
|||
}
|
||||
|
||||
function display( $output_empty = false ) {
|
||||
extract( $this->_args );
|
||||
$singular = $this->_args['singular'];
|
||||
|
||||
wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
|
||||
?>
|
||||
<table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" style="display:none;">
|
||||
<tbody id="the-comment-list"<?php if ( $singular ) echo " data-wp-lists='list:$singular'"; ?>>
|
||||
<?php if ( ! $output_empty ) $this->display_rows_or_placeholder(); ?>
|
||||
<tbody id="the-comment-list"<?php
|
||||
if ( $singular ) {
|
||||
echo " data-wp-lists='list:$singular'";
|
||||
} ?>>
|
||||
<?php if ( ! $output_empty ) {
|
||||
$this->display_rows_or_placeholder();
|
||||
} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
|
|
Loading…
Reference in New Issue