wp_customize_url

Returns a URL to load the Customizer.

Description

(string) wp_customize_url( (null) $stylesheet = null ); 

Returns (string)

Parameters (1)

0. $stylesheet — Optional. (null) => null
Theme to customize. Defaults to current theme. The theme's stylesheet will be urlencoded if necessary.

Usage

  1. if ( !function_exists( 'wp_customize_url' ) ) { 
  2. require_once ABSPATH . WPINC . '/theme.php'; 
  3.  
  4. // Optional. Theme to customize. Defaults to current theme. 
  5. // The theme's stylesheet will be urlencoded if necessary. 
  6. $stylesheet = null; 
  7.  
  8. // NOTICE! Understand what this does before running. 
  9. $result = wp_customize_url($stylesheet); 
  10.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/theme.php  
  1. function wp_customize_url( $stylesheet = null ) { 
  2. $url = admin_url( 'customize.php' ); 
  3. if ( $stylesheet ) 
  4. $url .= '?theme=' . urlencode( $stylesheet ); 
  5. return esc_url( $url );