Make WordPress Core


Ignore:
Timestamp:
05/13/2014 05:03:26 AM (11 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r27747 r28385  
    310310
    311311    function display() {
    312         extract( $this->_args );
    313 
    314312        wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
    315313
     
    599597
    600598    function display( $output_empty = false ) {
    601         extract( $this->_args );
     599        $singular = $this->_args['singular'];
    602600
    603601        wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
    604602?>
    605603<table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" style="display:none;">
    606     <tbody id="the-comment-list"<?php if ( $singular ) echo " data-wp-lists='list:$singular'"; ?>>
    607         <?php if ( ! $output_empty ) $this->display_rows_or_placeholder(); ?>
     604    <tbody id="the-comment-list"<?php
     605        if ( $singular ) {
     606            echo " data-wp-lists='list:$singular'";
     607        } ?>>
     608        <?php if ( ! $output_empty ) {
     609            $this->display_rows_or_placeholder();
     610        } ?>
    608611    </tbody>
    609612</table>
Note: See TracChangeset for help on using the changeset viewer.