Astra_Customizer_Container_Layout_Spacing_Configs::register_configuration( Array $configurations, WP_Customize_Manager $wp_customize )
Register Content Spacing 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/spacing/classes/sections/class-astra-customizer-container-layout-spacing-configs.php
public function register_configuration( $configurations, $wp_customize ) {
$_configs = array(
/**
* Option - Content Space
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[container-outside-spacing]',
'default' => astra_get_option( 'container-outside-spacing' ),
'type' => 'control',
'control' => 'ast-responsive-spacing',
'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
'transport' => 'postMessage',
'section' => 'section-container-layout',
'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ?
astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab,
'priority' => 95,
'title' => __( 'Outside Container Spacing', 'astra-addon' ),
'linked_choices' => true,
'unit_choices' => array( 'px', 'em', '%' ),
'choices' => array(
'top' => __( 'Top', 'astra-addon' ),
'right' => __( 'Right', 'astra-addon' ),
'bottom' => __( 'Bottom', 'astra-addon' ),
'left' => __( 'Left', 'astra-addon' ),
),
),
/**
* Option - Content Space
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[container-inside-spacing]',
'default' => astra_get_option( 'container-inside-spacing' ),
'type' => 'control',
'control' => 'ast-responsive-spacing',
'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ?
astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab,
'transport' => 'postMessage',
'section' => 'section-container-layout',
'priority' => 100,
'title' => __( 'Inside Container Spacing', 'astra-addon' ),
'linked_choices' => true,
'unit_choices' => array( 'px', 'em', '%' ),
'choices' => array(
'top' => __( 'Top', 'astra-addon' ),
'right' => __( 'Right', 'astra-addon' ),
'bottom' => __( 'Bottom', 'astra-addon' ),
'left' => __( 'Left', 'astra-addon' ),
),
),
);
if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) {
array_push(
$_configs,
/**
* Option: Container Tabs
*/
array(
'name' => 'section-container-layout-ast-context-tabs',
'section' => 'section-container-layout',
'type' => 'control',
'control' => 'ast-builder-header-control',
'priority' => 0,
'description' => '',
)
);
} else {
array_push(
$_configs,
/**
* Option: Divider
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[content-spacing-divider]',
'section' => 'section-container-layout',
'type' => 'control',
'control' => 'ast-heading',
'title' => __( 'Spacing', 'astra-addon' ),
'priority' => 90,
'settings' => array(),
'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ?
astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab,
)
);
}
return array_merge( $configurations, $_configs );
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 1.4.3 | Introduced. |