Astra_Addon_Woocommerce_My_Account_Configs::register_configuration( Array $configurations, WP_Customize_Manager $wp_customize )
Register Woocommerce My-Account 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/woocommerce/classes/sections/class-astra-addon-woocommerce-my-account-configs.php
public function register_configuration( $configurations, $wp_customize ) {
$_configs = array(
/**
* Adding My-Account new section.
*/
array(
'name' => 'section-ast-woo-my-account',
'title' => __( 'My Account', 'astra-addon' ),
'priority' => 24,
'panel' => 'woocommerce',
'type' => 'section',
),
/**
* Option: Divider.
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[woo-myaccount-general-divider]',
'section' => 'section-ast-woo-my-account',
'title' => __( 'General', 'astra-addon' ),
'type' => 'control',
'control' => 'ast-heading',
'priority' => 5,
'settings' => array(),
),
/**
* Enable modern my-account view.
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[modern-woo-account-view]',
'default' => astra_get_option( 'modern-woo-account-view' ),
'type' => 'control',
'section' => 'section-ast-woo-my-account',
'title' => __( 'Enable Modern Layout', 'astra-addon' ),
'priority' => 5,
'control' => Astra_Theme_Extension::$switch_control,
'divider' => array( 'ast_class' => 'ast-section-spacing' ),
),
/**
* Option: Divider.
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[woo-myaccount-dashboard-divider]',
'section' => 'section-ast-woo-my-account',
'title' => __( 'Dashboard', 'astra-addon' ),
'type' => 'control',
'control' => 'ast-heading',
'priority' => 10,
'settings' => array(),
'context' => array(
astra_addon_builder_helper()->general_tab_config,
array(
'setting' => ASTRA_THEME_SETTINGS . '[modern-woo-account-view]',
'operator' => '==',
'value' => true,
),
),
'divider' => array( 'ast_class' => 'ast-section-spacing' ),
),
/**
* Enable modern user-gravatar option.
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[my-account-user-gravatar]',
'default' => astra_get_option( 'my-account-user-gravatar' ),
'type' => 'control',
'section' => 'section-ast-woo-my-account',
'title' => __( 'Enable User Gravatar', 'astra-addon' ),
'context' => array(
astra_addon_builder_helper()->general_tab_config,
array(
'setting' => ASTRA_THEME_SETTINGS . '[modern-woo-account-view]',
'operator' => '==',
'value' => true,
),
),
'priority' => 10,
'control' => Astra_Theme_Extension::$switch_control,
'divider' => array( 'ast_class' => 'ast-section-spacing' ),
),
/**
* Option: Divider.
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[woo-myaccount-orders-divider]',
'section' => 'section-ast-woo-my-account',
'title' => __( 'Orders', 'astra-addon' ),
'type' => 'control',
'control' => 'ast-heading',
'priority' => 15,
'settings' => array(),
'context' => array(
astra_addon_builder_helper()->general_tab_config,
array(
'setting' => ASTRA_THEME_SETTINGS . '[modern-woo-account-view]',
'operator' => '==',
'value' => true,
),
),
'divider' => array( 'ast_class' => 'ast-section-spacing' ),
),
/**
* Enable grid orders view.
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[show-woo-grid-orders]',
'default' => astra_get_option( 'show-woo-grid-orders' ),
'type' => 'control',
'section' => 'section-ast-woo-my-account',
'title' => __( 'Enable Grid View', 'astra-addon' ),
'context' => array(
astra_addon_builder_helper()->general_tab_config,
array(
'setting' => ASTRA_THEME_SETTINGS . '[modern-woo-account-view]',
'operator' => '==',
'value' => true,
),
),
'priority' => 15,
'control' => Astra_Theme_Extension::$switch_control,
'divider' => array( 'ast_class' => 'ast-section-spacing' ),
),
);
$configurations = array_merge( $configurations, $_configs );
return $configurations;
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 3.9.0 | Introduced. |