Astra_Addon_Offcanvas_Configs

Register Off Canvas Customizer Configurations.


Description


Source

File: classes/builder/type/header/off-canvas/class-astra-addon-offcanvas-configs.php

class Astra_Addon_Offcanvas_Configs extends Astra_Customizer_Config_Base {

	/**
	 * Register Builder Above Customizer Configurations.
	 *
	 * @param Array                $configurations Astra Customizer Configurations.
	 * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
	 * @since 3.3.0
	 * @return Array Astra Customizer Configurations with updated configurations.
	 */
	public function register_configuration( $configurations, $wp_customize ) {

		$_section = 'section-popup-header-builder';

		$_configs = array(

			/**
			 * Option: Popup Width.
			 */
			array(
				'name'        => ASTRA_THEME_SETTINGS . '[off-canvas-width]',
				'section'     => $_section,
				'priority'    => 32,
				'transport'   => 'postMessage',
				'default'     => astra_get_option( 'off-canvas-width' ),
				'title'       => __( 'Popup Width ( % )', 'astra-addon' ),
				'type'        => 'control',
				'control'     => 'ast-responsive-slider',
				'input_attrs' => array(
					'min'  => 0,
					'step' => 1,
					'max'  => 100,
				),
				'context'     => array(
					astra_addon_builder_helper()->general_tab_config,
					array(
						'setting'  => ASTRA_THEME_SETTINGS . '[mobile-header-type]',
						'operator' => '==',
						'value'    => 'off-canvas',
					),
				),
			),

		);

		return array_merge( $configurations, $_configs );
	}
}

Changelog

Changelog
Version Description
3.3.0 Introduced.

Methods


User Contributed Notes

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