Astra_Customizer_Blog_Spacing_Configs::register_configuration( Array $configurations, WP_Customize_Manager $wp_customize )
Register Blog 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-blog-spacing-configs.php
public function register_configuration( $configurations, $wp_customize ) { $_configs = array( /** * Option: Post Outside Spacing */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-post-outside-spacing]', 'default' => astra_get_option( 'blog-post-outside-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-blog', 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, 'priority' => 165, 'title' => __( 'Outside Post 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' ), ), 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), ), /** * Option: Post Inside Spacing */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-post-inside-spacing]', 'default' => astra_get_option( 'blog-post-inside-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-blog', 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab : astra_addon_builder_helper()->general_tab, 'priority' => 170, 'title' => __( 'Inside Post Spacing', 'astra-addon' ), 'linked_choices' => true, 'unit_choices' => array( 'px', 'em', '%' ), 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), 'choices' => array( 'top' => __( 'Top', 'astra-addon' ), 'right' => __( 'Right', 'astra-addon' ), 'bottom' => __( 'Bottom', 'astra-addon' ), 'left' => __( 'Left', 'astra-addon' ), ), ), /** * Option: Post Pagination Spacing */ array( 'name' => ASTRA_THEME_SETTINGS . '[blog-post-pagination-spacing]', 'default' => astra_get_option( 'blog-post-pagination-spacing' ), 'type' => 'control', 'control' => 'ast-responsive-spacing', 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_spacing' ), 'transport' => 'postMessage', 'section' => 'section-blog', 'priority' => 175, 'title' => __( 'Post Pagination Spacing', 'astra-addon' ), 'context' => array( 'context' => ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) ? astra_addon_builder_helper()->design_tab_config : astra_addon_builder_helper()->general_tab_config, array( 'setting' => ASTRA_THEME_SETTINGS . '[blog-pagination]', 'operator' => '==', 'value' => 'number', ), ), '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. |