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.


git-svn-id: https://develop.svn.wordpress.org/trunk@28385 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-05-13 05:03:26 +00:00
parent f57bdbd238
commit 878a974477

View File

@ -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