Eliminate use of extract()
in WP_List_Table::display()
. The method only needs to read singular
from $this->_args
. Extraction is unnecessary.
See #22400. git-svn-id: https://develop.svn.wordpress.org/trunk@28386 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
878a974477
commit
a2122e6f7b
@ -760,7 +760,7 @@ class WP_List_Table {
|
||||
* @access public
|
||||
*/
|
||||
function display() {
|
||||
extract( $this->_args );
|
||||
$singular = $this->_args['singular'];
|
||||
|
||||
$this->display_tablenav( 'top' );
|
||||
|
||||
@ -778,7 +778,10 @@ class WP_List_Table {
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
<tbody id="the-list"<?php if ( $singular ) echo " data-wp-lists='list:$singular'"; ?>>
|
||||
<tbody id="the-list"<?php
|
||||
if ( $singular ) {
|
||||
echo " data-wp-lists='list:$singular'";
|
||||
} ?>>
|
||||
<?php $this->display_rows_or_placeholder(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user