WP_Customize_Manager::register_control_type PHP Method

register_control_type() public method

Registered types are eligible to be rendered via JS and created dynamically.
Since: 4.1.0
public register_control_type ( string $control )
$control string Name of a custom control which is a subclass of WP_Customize_Control.
    public function register_control_type($control)
    {
        $this->registered_control_types[] = $control;
    }

Usage Example

Exemplo n.º 1
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function blue_planet_customize_register($wp_customize)
{
    $new_defaults = blue_planet_get_default_options();
    $options = blue_planet_get_option_all();
    // Custom Controls.
    require get_template_directory() . '/inc/customizer-includes/controls.php';
    $wp_customize->register_control_type('Blue_Planet_Customize_Heading_Control');
    $wp_customize->register_control_type('Blue_Planet_Customize_Dropdown_Taxonomies_Control');
    // Theme Settings.
    require get_template_directory() . '/inc/customizer-includes/theme.php';
    // Slider Settings.
    require get_template_directory() . '/inc/customizer-includes/slider.php';
    // Reset Settings.
    require get_template_directory() . '/inc/customizer-includes/reset.php';
}
All Usage Examples Of WP_Customize_Manager::register_control_type
WP_Customize_Manager