customize_register хук-событиеWP 3.4.0

Fires once WordPress has loaded, allowing scripts and styles to be initialized.

Использование

add_action( 'customize_register', 'wp_kama_customize_register_action' );

/**
 * Function for `customize_register` action-hook.
 * 
 * @param WP_Customize_Manager $manager WP_Customize_Manager instance.
 *
 * @return void
 */
function wp_kama_customize_register_action( $manager ){

	// action...
}
$manager(WP_Customize_Manager)
WP_Customize_Manager instance.

Список изменений

С версии 3.4.0 Введена.

Где вызывается хук

WP_Customize_Manager::wp_loaded()
customize_register
_wp_customize_publish_changeset()
customize_register
wp-includes/class-wp-customize-manager.php 933
do_action( 'customize_register', $this );
wp-includes/theme.php 3553
do_action( 'customize_register', $wp_customize );

Где используется хук в WordPress

wp-includes/class-wp-customize-manager.php 1629
add_action( 'customize_register', array( $this, '_save_starter_content_changeset' ), 1000 );
wp-includes/class-wp-customize-manager.php 386
add_action( 'customize_register', array( $this, 'register_controls' ) );
wp-includes/class-wp-customize-manager.php 387
add_action( 'customize_register', array( $this, 'register_dynamic_settings' ), 11 ); // Allow code to create settings first.
wp-includes/class-wp-customize-nav-menus.php 49
add_action( 'customize_register', array( $this, 'customize_register' ), 11 );
wp-includes/class-wp-customize-widgets.php 105
add_action( 'customize_register', array( $this, 'schedule_customize_register' ), 1 );
wp-includes/theme.php 3549
remove_action( 'customize_register', array( $wp_customize, 'register_controls' ) );