Astra_Customizer_Adv_Search_Configs::register_configuration( Array $configurations, WP_Customize_Manager $wp_customize )

Register Builder Customizer Configurations.


Description


Parameters

$configurations

(Array) (Required) Astra Customizer Configurations.

$wp_customize

(WP_Customize_Manager) (Required) instance of WP_Customize_Manager.


Return

(Array) Astra Customizer Configurations with updated configurations.


Source

File: addons/advanced-search/classes/sections/class-astra-customizer-adv-search-configs.php

	public function register_configuration( $configurations, $wp_customize ) {

		$_section = 'section-header-search';

		/**
		 * Option: Pro Search Bar Configs.
		 */
		$_configs = array(
			// Option: Header Search Style.
			array(
				'name'      => ASTRA_THEME_SETTINGS . '[header-search-box-type]',
				'default'   => astra_get_option( 'header-search-box-type' ),
				'section'   => $_section,
				'priority'  => 1,
				'title'     => __( 'Search Style', 'astra-addon' ),
				'type'      => 'control',
				'control'   => 'ast-select',
				'choices'   => array(
					'slide-search' => __( 'Slide Search', 'astra-addon' ),
					'full-screen'  => __( 'Full Screen Search', 'astra-addon' ),
					'header-cover' => __( 'Header Cover Search', 'astra-addon' ),
					'search-box'   => __( 'Search Box', 'astra-addon' ),
				),
				'context'   => astra_addon_builder_helper()->general_tab,
				'transport' => 'postMessage',
				'partial'   => array(
					'selector'            => '.ast-header-search',
					'container_inclusive' => false,
					'render_callback'     => array( Astra_Ext_Adv_Search_Markup::get_instance(), 'get_search_markup' ),
				),
				'divider'   => array( 'ast_class' => 'ast-bottom-divider' ),
			),

			/**
			 * Option: search placeholder text.
			 */
			array(
				'name'      => ASTRA_THEME_SETTINGS . '[header-search-box-placeholder]',
				'default'   => astra_get_option( 'header-search-box-placeholder' ),
				'section'   => $_section,
				'priority'  => 2,
				'title'     => __( 'Placeholder Text', 'astra-addon' ),
				'type'      => 'control',
				'control'   => 'text',
				'transport' => 'postMessage',
				'partial'   => array(
					'selector'            => '.ast-header-search',
					'container_inclusive' => false,
					'render_callback'     => array( Astra_Ext_Adv_Search_Markup::get_instance(), 'get_search_markup' ),
				),
				'context'   => astra_addon_builder_helper()->general_tab,
			),
		);

		return array_merge( $configurations, $_configs );
	}

Changelog

Changelog
Version Description
3.0.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.