Astra_Body_Colors_Configs::register_configuration( Array $configurations, WP_Customize_Manager $wp_customize )
Register Body Color 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: inc/customizer/configurations/colors-background/class-astra-body-colors-configs.php
public function register_configuration( $configurations, $wp_customize ) {
$_section = 'section-colors-background';
if ( class_exists( 'Astra_Ext_Extension' ) && Astra_Ext_Extension::is_active( 'colors-and-background' ) && ! astra_has_gcp_typo_preset_compatibility() ) {
$_section = 'section-colors-body';
}
$_configs = array(
array(
'name' => ASTRA_THEME_SETTINGS . '[global-color-palette]',
'type' => 'control',
'control' => 'ast-hidden',
'section' => $_section,
'priority' => 5,
'title' => __( 'Global Palette', 'astra' ),
'default' => astra_get_option( 'global-color-palette' ),
'transport' => 'postMessage',
),
array(
'name' => 'astra-color-palettes',
'type' => 'control',
'control' => 'ast-color-palette',
'section' => $_section,
'priority' => 5,
'title' => __( 'Global Palette', 'astra' ),
'default' => astra_get_palette_colors(),
'transport' => 'postMessage',
'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
),
/**
* Option: Theme Color
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[theme-color]',
'type' => 'control',
'control' => 'ast-color',
'section' => $_section,
'default' => astra_get_option( 'theme-color' ),
'priority' => 5,
'title' => __( 'Theme Color', 'astra' ),
),
/**
* Option: Link Color
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[link-color]',
'section' => $_section,
'type' => 'control',
'control' => 'ast-color',
'default' => astra_get_option( 'link-color' ),
'priority' => 5,
'title' => __( 'Link Color', 'astra' ),
),
/**
* Option: Link Hover Color
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[link-h-color]',
'section' => $_section,
'default' => astra_get_option( 'link-h-color' ),
'type' => 'control',
'control' => 'ast-color',
'priority' => 5,
'title' => __( 'Link Hover Color', 'astra' ),
),
/**
* Option: Text Color
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[text-color]',
'default' => astra_get_option( 'text-color' ),
'type' => 'control',
'control' => 'ast-color',
'section' => $_section,
'priority' => 6,
'title' => __( 'Text Color', 'astra' ),
'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
),
);
$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. |