array(), 'style' => array() ) ); $wp_customize->add_section( 'botiga_section_hb_component__search', array( 'title' => esc_html__( 'Search', 'botiga' ), 'panel' => 'botiga_panel_header' ) ); if( defined( 'BOTIGA_PRO_VERSION' ) ) { $wp_customize->add_setting( 'botiga_section_hb_component__search_tabs', array( 'default' => '', 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Botiga_Tab_Control ( $wp_customize, 'botiga_section_hb_component__search_tabs', array( 'label' => '', 'section' => 'botiga_section_hb_component__search', 'controls_general' => json_encode( array_map( function( $name ){ return "#customize-control-$name"; }, $opts_to_move[ 'general' ] ) ), 'controls_design' => json_encode( array_merge( array( '#customize-control-bhfb_search_icon', '#customize-control-bhfb_search_icon_sticky_title', '#customize-control-bhfb_search_icon_sticky', ), array_map( function( $name ){ return "#customize-control-$name"; }, $opts_to_move[ 'style' ] ) ) ), 'priority' => 20 ) ) ); } // Icon Color $wp_customize->add_setting( 'bhfb_search_icon_color', array( 'default' => '#212121', 'sanitize_callback' => 'botiga_sanitize_hex_rgba', 'transport' => 'postMessage' ) ); $wp_customize->add_setting( 'bhfb_search_icon_color_hover', array( 'default' => '#757575', 'sanitize_callback' => 'botiga_sanitize_hex_rgba', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new Botiga_Color_Group( $wp_customize, 'bhfb_search_icon', array( 'label' => esc_html__( 'Icon Color', 'botiga' ), 'section' => 'botiga_section_hb_component__search', 'settings' => array( 'normal' => 'bhfb_search_icon_color', 'hover' => 'bhfb_search_icon_color_hover', ), 'priority' => 25 ) ) ); // Sticky Header - Title $wp_customize->add_setting( 'bhfb_search_icon_sticky_title', array( 'default' => '', 'sanitize_callback' => 'esc_attr' ) ); $wp_customize->add_control( new Botiga_Text_Control( $wp_customize, 'bhfb_search_icon_sticky_title', array( 'label' => esc_html__( 'Sticky Header - Active State', 'botiga' ), 'description' => esc_html__( 'Control the colors when the sticky header state is active.', 'botiga' ), 'section' => 'botiga_section_hb_component__search', 'active_callback' => 'botiga_sticky_header_enabled', 'priority' => 32 ) ) ); // Sticky Header - Icon Color $wp_customize->add_setting( 'bhfb_search_icon_sticky_color', array( 'default' => '#212121', 'sanitize_callback' => 'botiga_sanitize_hex_rgba', 'transport' => 'postMessage' ) ); $wp_customize->add_setting( 'bhfb_search_icon_sticky_color_hover', array( 'default' => '#757575', 'sanitize_callback' => 'botiga_sanitize_hex_rgba', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new Botiga_Color_Group( $wp_customize, 'bhfb_search_icon_sticky', array( 'label' => esc_html__( 'Icon Color', 'botiga' ), 'section' => 'botiga_section_hb_component__search', 'settings' => array( 'normal' => 'bhfb_search_icon_sticky_color', 'hover' => 'bhfb_search_icon_color_hover', ), 'active_callback' => 'botiga_sticky_header_enabled', 'priority' => 33 ) ) ); // Move existing options. $priority = 40; foreach( $opts_to_move as $control_tabs ) { foreach( $control_tabs as $option_name ) { if( $wp_customize->get_control( $option_name ) === NULL ) { continue; } $wp_customize->get_control( $option_name )->section = 'botiga_section_hb_component__search'; $wp_customize->get_control( $option_name )->priority = $priority; $priority++; } } // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound