Tribe__Events__Customizer__Text::register_settings( WP_Customize_Section $section, WP_Customize_Manager $manager )
Create the Fields/Settings for this sections.
Contents
Parameters
- $section
-
(WP_Customize_Section) (Required) The WordPress section instance.
- $manager
-
(WP_Customize_Manager) (Required) [description]
Return
(void)
Source
File: src/Tribe/Customizer/Text.php
public function register_settings( WP_Customize_Section $section, WP_Customize_Manager $manager ) {
$customizer = Tribe__Customizer::instance();
$manager->add_setting(
$customizer->get_setting_name( 'link_color', $section ),
array(
'default' => $this->get_default( 'link_color' ),
'type' => 'option',
'sanitize_callback' => 'sanitize_hex_color',
'sanitize_js_callback' => 'maybe_hash_hex_color',
)
);
$manager->add_control(
new WP_Customize_Color_Control(
$manager,
$customizer->get_setting_name( 'link_color', $section ),
array(
'label' => esc_html__( 'Link Color', 'the-events-calendar' ),
'section' => $section->id,
)
)
);
// Introduced to make Selective Refresh have less code duplication.
$customizer->add_setting_name( $customizer->get_setting_name( 'link_color', $section ) );
}