Astra_Customizer_Notices_Configs::register_configuration( Array $configurations, WP_Customize_Manager $wp_customize )
Register General 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: classes/customizer/class-astra-customizer-notices-configs.php
public function register_configuration( $configurations, $wp_customize ) { // Add controls only if Advanced Hooks addon is active. if ( defined( 'ASTRA_ADVANCED_HOOKS_POST_TYPE' ) ) { $_configs = array(); if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) { $_configs = array( /** * Notice for custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[ast-callback-notice-custom-layout]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-header-builder-layout', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), ); } else { $_configs = array( /** * Notice for Above header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-layout-above-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-above-header', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Below header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-layout-below-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-below-header', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Primary header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-layout-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-header', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Sticky header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-layout-sticky-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-sticky-header', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Transparent header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-layout-transparent-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-transparent-header', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Colors - Primary header created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-color-primary-header]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'section-colors-primary-menu', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), /** * Notice for Title & Tagline section when header is created using custom layout. */ array( 'name' => ASTRA_THEME_SETTINGS . '[header-custom-title_tagline]', 'type' => 'control', 'control' => 'ast-description', 'section' => 'title_tagline', 'priority' => 1, 'active_callback' => array( $this, 'is_custom_layout_header' ), 'help' => $this->get_help_text_notice( 'custom-header' ), ), ); } $configurations = array_merge( $configurations, $_configs ); } return $configurations; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.4.3 | Introduced. |