wp_customize_url() WordPress Function

The wp_customize_url() function allows you to change the URL of the WordPress Customizer. This can be useful if you want to customize the Customizer for your own purposes or if you want to use a different Customizer URL for testing purposes.

wp_customize_url( string $stylesheet = '' ) #

Returns a URL to load the Customizer.


Parameters

$stylesheet

(string)(Optional) Theme to customize. Defaults to active theme. The theme's stylesheet will be urlencoded if necessary.

Default value: ''


Top ↑

Return

(string)


Top ↑

Source

File: wp-includes/theme.php

function wp_customize_url( $stylesheet = '' ) {
	$url = admin_url( 'customize.php' );
	if ( $stylesheet ) {
		$url .= '?theme=' . urlencode( $stylesheet );
	}
	return esc_url( $url );
}


Top ↑

Changelog

Changelog
VersionDescription
3.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More