Astra_Sticky_Header_Html_Configs
Description
Source
File: addons/sticky-header/classes/sections/class-astra-sticky-header-html-configs.php
class Astra_Sticky_Header_Html_Configs extends Astra_Customizer_Config_Base {
/**
* Register Sticky Header Colors Customizer Configurations.
*
* @param Array $configurations Astra Customizer Configurations.
* @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
* @since 3.0.0
* @return Array Astra Customizer Configurations with updated configurations.
*/
public function register_configuration( $configurations, $wp_customize ) {
$html_config = array();
$component_limit = astra_addon_builder_helper()->component_limit;
for ( $index = 1; $index <= $component_limit; $index++ ) {
$_section = 'section-hb-html-' . $index;
$_configs = array(
/**
* Option: Sticky Header HTML Heading.
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[sticky-header-html-' . $index . '-heading]',
'type' => 'control',
'control' => 'ast-heading',
'section' => $_section,
'title' => __( 'Sticky Header Option', 'astra-addon' ),
'settings' => array(),
'priority' => 110,
'context' => astra_addon_builder_helper()->design_tab,
),
/**
* Option: HTML Color.
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[sticky-header-html-' . $index . 'color]',
'default' => astra_get_option( 'sticky-header-html-' . $index . 'color' ),
'type' => 'control',
'section' => $_section,
'priority' => 120,
'transport' => 'postMessage',
'control' => 'ast-color',
'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_alpha_color' ),
'title' => __( 'Text Color', 'astra-addon' ),
'context' => astra_addon_builder_helper()->design_tab,
),
);
$html_config[] = $_configs;
}
$html_config = call_user_func_array( 'array_merge', $html_config + array( array() ) );
$configurations = array_merge( $configurations, $html_config );
return $configurations;
}
}
Expand full source code Collapse full source code View on Trac
Methods
- register_configuration — Register Sticky Header Colors Customizer Configurations.