mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
Use the proper value for the switch-theme nonce in the upgrader. Fixes child theme activation after install. props duck_. fixes #20914.
git-svn-id: http://core.svn.wordpress.org/trunk@21061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0a22489dc7
commit
551f88dbcb
@ -1513,7 +1513,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
|
||||
'template' => $template,
|
||||
'stylesheet' => $stylesheet,
|
||||
), admin_url('themes.php') );
|
||||
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $template );
|
||||
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
||||
|
||||
$install_actions = array();
|
||||
$install_actions['preview'] = '<a href="' . esc_url( $preview_link ) . '" class="hide-if-customize" title="' . esc_attr( sprintf( __('Preview “%s”'), $name ) ) . '">' . __('Preview') . '</a>';
|
||||
@ -1577,7 +1577,7 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||
'template' => $template,
|
||||
'stylesheet' => $stylesheet,
|
||||
), admin_url('themes.php') );
|
||||
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $template );
|
||||
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
||||
|
||||
if ( get_stylesheet() == $stylesheet ) {
|
||||
$update_actions['preview'] = '<a href="' . wp_customize_url( $stylesheet ) . '" class="hide-if-no-customize load-customize" title="' . esc_attr( sprintf( __('Customize “%s”'), $name ) ) . '">' . __('Customize') . '</a>';
|
||||
|
Loading…
Reference in New Issue
Block a user