mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 14:35:07 +00:00
Fix old-school Preview links when a theme directory contains spaces. Fix the theme-editor.php link from MS themes screens when a theme directory contains spaces. see #21749.
git-svn-id: http://core.svn.wordpress.org/trunk@21752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
51a2425fe8
commit
d476c22aa1
@ -287,7 +287,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( current_user_can('edit_themes') )
|
if ( current_user_can('edit_themes') )
|
||||||
$actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . $theme_key ) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>';
|
$actions['edit'] = '<a href="' . esc_url('theme-editor.php?theme=' . urlencode( $theme_key ) ) . '" title="' . esc_attr__('Open this theme in the Theme Editor') . '" class="edit">' . __('Edit') . '</a>';
|
||||||
|
|
||||||
if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $theme_key != get_option( 'stylesheet' ) && $theme_key != get_option( 'template' ) )
|
if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $theme_key != get_option( 'stylesheet' ) && $theme_key != get_option( 'template' ) )
|
||||||
$actions['delete'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=delete-selected&checked[]=' . $theme_key . '&theme_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-themes' ) ) . '" title="' . esc_attr__( 'Delete this theme' ) . '" class="delete">' . __( 'Delete' ) . '</a>';
|
$actions['delete'] = '<a href="' . esc_url( wp_nonce_url( 'themes.php?action=delete-selected&checked[]=' . $theme_key . '&theme_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-themes' ) ) . '" title="' . esc_attr__( 'Delete this theme' ) . '" class="delete">' . __( 'Delete' ) . '</a>';
|
||||||
|
@ -128,7 +128,7 @@ class WP_Themes_List_Table extends WP_List_Table {
|
|||||||
$activate_link = wp_nonce_url( "themes.php?action=activate&template=" . urlencode( $template ) . "&stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $stylesheet );
|
$activate_link = wp_nonce_url( "themes.php?action=activate&template=" . urlencode( $template ) . "&stylesheet=" . urlencode( $stylesheet ), 'switch-theme_' . $stylesheet );
|
||||||
|
|
||||||
$preview_link = esc_url( add_query_arg(
|
$preview_link = esc_url( add_query_arg(
|
||||||
array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => true, 'TB_iframe' => 'true' ),
|
array( 'preview' => 1, 'template' => urlencode( $template ), 'stylesheet' => urlencode( $stylesheet ), 'preview_iframe' => true, 'TB_iframe' => 'true' ),
|
||||||
home_url( '/' ) ) );
|
home_url( '/' ) ) );
|
||||||
|
|
||||||
$actions = array();
|
$actions = array();
|
||||||
|
@ -1500,14 +1500,14 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
|
|||||||
|
|
||||||
$preview_link = add_query_arg( array(
|
$preview_link = add_query_arg( array(
|
||||||
'preview' => 1,
|
'preview' => 1,
|
||||||
'template' => $template,
|
'template' => urlencode( $template ),
|
||||||
'stylesheet' => $stylesheet,
|
'stylesheet' => urlencode( $stylesheet ),
|
||||||
), trailingslashit( get_home_url() ) );
|
), trailingslashit( get_home_url() ) );
|
||||||
|
|
||||||
$activate_link = add_query_arg( array(
|
$activate_link = add_query_arg( array(
|
||||||
'action' => 'activate',
|
'action' => 'activate',
|
||||||
'template' => $template,
|
'template' => urlencode( $template ),
|
||||||
'stylesheet' => $stylesheet,
|
'stylesheet' => urlencode( $stylesheet ),
|
||||||
), admin_url('themes.php') );
|
), admin_url('themes.php') );
|
||||||
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
||||||
|
|
||||||
@ -1564,14 +1564,14 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
|
|||||||
|
|
||||||
$preview_link = add_query_arg( array(
|
$preview_link = add_query_arg( array(
|
||||||
'preview' => 1,
|
'preview' => 1,
|
||||||
'template' => $template,
|
'template' => urlencode( $template ),
|
||||||
'stylesheet' => $stylesheet,
|
'stylesheet' => urlencode( $stylesheet ),
|
||||||
), trailingslashit( get_home_url() ) );
|
), trailingslashit( get_home_url() ) );
|
||||||
|
|
||||||
$activate_link = add_query_arg( array(
|
$activate_link = add_query_arg( array(
|
||||||
'action' => 'activate',
|
'action' => 'activate',
|
||||||
'template' => $template,
|
'template' => urlencode( $template ),
|
||||||
'stylesheet' => $stylesheet,
|
'stylesheet' => urlencode( $stylesheet ),
|
||||||
), admin_url('themes.php') );
|
), admin_url('themes.php') );
|
||||||
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
$activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user