customize_register

The WordPress Core customize register hook.

Description

add_action( 'customize_register', (callback) $array, (int) $int ); 

Parameters (2)

0. $array (callback) => array( $this, 'customize_register' )
The array.
1. $int (int) => 11
The int.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'customize_register', $array, $int ); 
The following example is for adding a hook callback.
  1. // define the customize_register callback 
  2. function action_customize_register( $array, $int ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'customize_register', 'action_customize_register', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'customize_register', 'action_customize_register', 10, 2 ); 

Defined (5)

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

/wp-includes/class-wp-customize-nav-menus.php  
  1. add_action( 'customize_register', array( $this, 'customize_register' ), 11 ); 
/wp-includes/class-wp-customize-manager.php  
  1. add_action( 'customize_register', array( $this, 'register_controls' ) ); 
  1. add_action( 'customize_register', array( $this, 'register_dynamic_settings' ), 11 ); // allow code to create settings first 
/wp-includes/class-wp-customize-widgets.php  
  1. add_action( 'customize_register', array( $this, 'schedule_customize_register' ), 1 ); 
/wp-includes/class-wp-customize-manager.php  
  1. do_action( 'customize_register', $this );