Make WordPress Core


Ignore:
Timestamp:
03/03/2012 02:40:43 AM (13 years ago)
Author:
koopersmith
Message:

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.

File:
1 edited

Legend:

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

    r20100 r20104  
    126126            $version = $theme->display('Version');
    127127            $author = $theme->display('Author');
    128  
     128
    129129            $activate_link = wp_nonce_url( "themes.php?action=activate&template=" . urlencode( $template ) . "&stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $template );
    130130            $preview_link = esc_url( add_query_arg(
    131131                array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ),
    132132                home_url( '/' ) ) );
    133  
     133
    134134            $actions = array();
    135135            $actions[] = '<a href="' . $activate_link . '" class="activatelink" title="'
     
    141141                    . '" onclick="' . "return confirm( '" . esc_js( sprintf( __( "You are about to delete this theme '%s'\n  'Cancel' to stop, 'OK' to delete." ), $title ) )
    142142                    . "' );" . '">' . __( 'Delete' ) . '</a>';
    143  
     143
    144144            $actions = apply_filters( 'theme_action_links', $actions, $theme );
    145  
     145
    146146            $actions = implode ( ' | ', $actions );
    147147            ?>
     
    154154            /* translators: 1: theme title, 2: theme version, 3: theme author */
    155155            printf( __( '%1$s %2$s by %3$s' ), $title, $version, $author ) ; ?></h3>
    156  
     156
    157157            <span class='action-links'><?php echo $actions ?></span>
    158158            <span class="separator hide-if-no-js">| </span><a href="#" class="theme-detail hide-if-no-js" tabindex='4'><?php _e('Details') ?></a>
     
    228228            $args = array_merge( $args, $extra_args );
    229229
    230         parent::_js_vars( $args );
     230        printf( "<script type='text/javascript'>var theme_list_args = %s;</script>\n", json_encode( $args ) );
     231        parent::_js_vars();
    231232    }
    232233}
Note: See TracChangeset for help on using the changeset viewer.