mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
URL encode the theme stylesheet passed into wp_customize_url(). see #21749.
git-svn-id: http://core.svn.wordpress.org/trunk@21713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e03640b121
commit
1635740139
@ -1646,11 +1646,12 @@ add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' );
|
|||||||
* @since 3.4.0
|
* @since 3.4.0
|
||||||
*
|
*
|
||||||
* @param string $stylesheet Optional. Theme to customize. Defaults to current theme.
|
* @param string $stylesheet Optional. Theme to customize. Defaults to current theme.
|
||||||
|
* The theme's stylesheet will be urlencoded if necessary.
|
||||||
*/
|
*/
|
||||||
function wp_customize_url( $stylesheet = null ) {
|
function wp_customize_url( $stylesheet = null ) {
|
||||||
$url = admin_url( 'customize.php' );
|
$url = admin_url( 'customize.php' );
|
||||||
if ( $stylesheet )
|
if ( $stylesheet )
|
||||||
$url .= '?theme=' . $stylesheet;
|
$url .= '?theme=' . urlencode( $stylesheet );
|
||||||
return esc_url( $url );
|
return esc_url( $url );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user