Astra_Woo_Shop_Misc_Layout_Configs::register_configuration( Array $configurations, WP_Customize_Manager $wp_customize )
Register Astra-WooCommerce Misc 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
public function register_configuration( $configurations, $wp_customize ) {
$_configs = array(
/**
* Option: Enable Quantity Plus and Minus.
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[single-product-plus-minus-button]',
'default' => astra_get_option( 'single-product-plus-minus-button' ),
'type' => 'control',
'section' => 'section-woo-misc',
'title' => __( 'Enable Quantity Plus and Minus', 'astra' ),
'description' => __( 'Adds plus and minus buttons besides product quantity', 'astra' ),
'priority' => 59,
'control' => 'ast-toggle-control',
'divider' => array( 'ast_class' => 'ast-section-spacing' ),
),
);
/**
* Option: Adds tabs only if astra addons is enabled.
*/
if ( astra_has_pro_woocommerce_addon() ) {
$_configs[] = array(
'name' => 'section-woo-general-tabs',
'section' => 'section-woo-misc',
'type' => 'control',
'control' => 'ast-builder-header-control',
'priority' => 0,
'description' => '',
);
}
if ( ! defined( 'ASTRA_EXT_VER' ) ) {
// Learn More link if Astra Pro is not activated.
$_configs[] = array(
'name' => ASTRA_THEME_SETTINGS . '[single-product-plus-minus-button-link]',
'type' => 'control',
'control' => 'ast-button-link',
'section' => 'section-woo-misc',
'priority' => 999,
'title' => __( 'View Astra Pro Features', 'astra' ),
'url' => astra_get_pro_url( 'https://wpastra.com/pro/', 'customizer', 'learn-more', 'upgrade-to-pro' ),
'settings' => array(),
'divider' => array( 'ast_class' => 'ast-section-spacing' ),
'context' => array(
Astra_Builder_Helper::$general_tab_config,
),
);
}
return array_merge( $configurations, $_configs );
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 3.9.2 | Introduced. |