From e251ff1c042a2491b8394b0a753ab81f740b6650 Mon Sep 17 00:00:00 2001 From: koopersmith Date: Sat, 3 Mar 2012 02:40:43 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-list-table.php | 5 +---- wp-admin/includes/class-wp-themes-list-table.php | 13 +++++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/wp-admin/includes/class-wp-list-table.php b/wp-admin/includes/class-wp-list-table.php index eae5f9c1a..ee5f9f9b3 100644 --- a/wp-admin/includes/class-wp-list-table.php +++ b/wp-admin/includes/class-wp-list-table.php @@ -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( "\n", json_encode( $args ) ); } } diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php index a1d837453..5cecb6b04 100644 --- a/wp-admin/includes/class-wp-themes-list-table.php +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -125,12 +125,12 @@ class WP_Themes_List_Table extends WP_List_Table { $title = $theme->display('Name'); $version = $theme->display('Version'); $author = $theme->display('Author'); - + $activate_link = wp_nonce_url( "themes.php?action=activate&template=" . urlencode( $template ) . "&stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $template ); $preview_link = esc_url( add_query_arg( array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ), home_url( '/' ) ) ); - + $actions = array(); $actions[] = '' . __( 'Activate' ) . ''; @@ -140,9 +140,9 @@ class WP_Themes_List_Table extends WP_List_Table { $actions[] = '' . __( 'Delete' ) . ''; - + $actions = apply_filters( 'theme_action_links', $actions, $theme ); - + $actions = implode ( ' | ', $actions ); ?> @@ -153,7 +153,7 @@ class WP_Themes_List_Table extends WP_List_Table {

- + |
@@ -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( "\n", json_encode( $args ) ); + parent::_js_vars(); } }