mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 21:28:02 +01:00
Themes: When the user doesn't have switch_themes capabilities, and we've passed the current theme, detect the theme slug/stylesheet correctly so that the flags are set properly. See #25948
git-svn-id: https://develop.svn.wordpress.org/trunk@26469 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
59ecd28d2e
commit
13ba79ef36
@ -392,12 +392,13 @@ function wp_prepare_themes_for_js( $themes = null ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WP_Theme::sort_by_name( $themes );
|
WP_Theme::sort_by_name( $themes );
|
||||||
foreach ( $themes as $slug => $theme ) {
|
foreach ( $themes as $theme ) {
|
||||||
$parent = false;
|
$parent = false;
|
||||||
if ( $theme->parent() ) {
|
if ( $theme->parent() ) {
|
||||||
$parent = $theme->parent()->display( 'Name' );
|
$parent = $theme->parent()->display( 'Name' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$slug = $theme->get_stylesheet();
|
||||||
$encoded_slug = urlencode( $slug );
|
$encoded_slug = urlencode( $slug );
|
||||||
|
|
||||||
$prepared_themes[] = array(
|
$prepared_themes[] = array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user