Astra_Customizer_Site_Identity_Spacing_Configs::register_configuration( Array $configurations, WP_Customize_Manager $wp_customize )
Register Site Identity 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-site-identity-spacing-configs.php
public function register_configuration( $configurations, $wp_customize ) {
if ( is_astra_theme_3_5_0_version() ) {
$_configs = array(
/**
* Option: Divider
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[divider-section-site-identity-spacing]',
'type' => 'control',
'control' => 'ast-heading',
'section' => 'title_tagline',
'title' => __( 'Spacing', 'astra-addon' ),
'context' => array(
'relation' => 'AND',
astra_addon_builder_helper()->general_tab_config,
array(
'relation' => 'OR',
array(
'setting' => ASTRA_THEME_SETTINGS . '[display-site-title]',
'operator' => '!=',
'value' => 0,
),
array(
'setting' => 'custom_logo',
'operator' => '!=',
'value' => '',
),
),
),
'priority' => 50,
'settings' => array(),
),
/**
* Option - Header Space
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[site-identity-spacing]',
'default' => astra_get_option( 'site-identity-spacing' ),
'type' => 'control',
'transport' => 'postMessage',
'control' => 'ast-responsive-spacing',
'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
'section' => 'title_tagline',
'priority' => 50,
'title' => __( 'Site Identity Space', 'astra-addon' ),
'context' => array(
'relation' => 'AND',
astra_addon_builder_helper()->general_tab_config,
array(
'relation' => 'OR',
array(
'setting' => ASTRA_THEME_SETTINGS . '[display-site-title]',
'operator' => '!=',
'value' => 0,
),
array(
'setting' => 'custom_logo',
'operator' => '!=',
'value' => '',
),
),
),
'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' ),
),
),
);
} else {
$_configs = array(
/**
* Option: Divider
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[divider-section-site-identity-spacing]',
'type' => 'control',
'control' => 'ast-heading',
'section' => 'title_tagline',
'title' => __( 'Spacing', 'astra-addon' ),
'context' => array(
'relation' => 'AND',
astra_addon_builder_helper()->general_tab_config,
array(
'relation' => 'OR',
array(
'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]',
'setting-key' => 'desktop',
'operator' => '!=',
'value' => 0,
),
array(
'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]',
'setting-key' => 'tablet',
'operator' => '!=',
'value' => 0,
),
array(
'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]',
'setting-key' => 'mobile',
'operator' => '!=',
'value' => 0,
),
array(
'setting' => 'custom_logo',
'operator' => '!=',
'value' => '',
),
),
),
'priority' => 50,
'settings' => array(),
),
/**
* Option - Header Space
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[site-identity-spacing]',
'default' => astra_get_option( 'site-identity-spacing' ),
'type' => 'control',
'transport' => 'postMessage',
'control' => 'ast-responsive-spacing',
'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ),
'section' => 'title_tagline',
'priority' => 50,
'title' => __( 'Site Identity Space', 'astra-addon' ),
'context' => array(
'relation' => 'AND',
astra_addon_builder_helper()->general_tab_config,
array(
'relation' => 'OR',
array(
'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]',
'setting-key' => 'desktop',
'operator' => '!=',
'value' => 0,
),
array(
'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]',
'setting-key' => 'tablet',
'operator' => '!=',
'value' => 0,
),
array(
'setting' => ASTRA_THEME_SETTINGS . '[display-site-title-responsive]',
'setting-key' => 'mobile',
'operator' => '!=',
'value' => 0,
),
array(
'setting' => 'custom_logo',
'operator' => '!=',
'value' => '',
),
),
),
'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' ),
),
),
);
}
return array_merge( $configurations, $_configs );
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 1.4.3 | Introduced. |