Partially revert [20100]. The list_args JS variable cannot be extended due to its use as an argument in fetch-list. see #19815.

We should reattempt extending the args created in WP_List_Table, but will need to deprecate the current list_args to do so.

Also, infinite scroll on themes pages is no longer broken. Go team.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2012-03-03 02:40:43 +00:00
parent 46daef9849
commit e251ff1c04
2 changed files with 8 additions and 10 deletions

View File

@ -903,7 +903,7 @@ class WP_List_Table {
*
* @access private
*/
function _js_vars( $extra_args = array() ) {
function _js_vars() {
$current_screen = get_current_screen();
$args = array(
@ -914,9 +914,6 @@ class WP_List_Table {
)
);
if ( is_array( $extra_args ) )
$args = array_merge( $args, $extra_args );
printf( "<script type='text/javascript'>list_args = %s;</script>\n", json_encode( $args ) );
}
}

View File

@ -227,6 +227,7 @@ class WP_Themes_List_Table extends WP_List_Table {
if ( is_array( $extra_args ) )
$args = array_merge( $args, $extra_args );
parent::_js_vars( $args );
printf( "<script type='text/javascript'>var theme_list_args = %s;</script>\n", json_encode( $args ) );
parent::_js_vars();
}
}