From 9d4123cee1867ee7199b06bdc92d40611f547ecc Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 21 Jul 2021 14:54:07 -0500 Subject: Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/. --- .../class-astra-edd-archive-layout-configs.php | 214 +++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 inc/compatibility/edd/customizer/sections/layout/class-astra-edd-archive-layout-configs.php (limited to 'inc/compatibility/edd/customizer/sections/layout/class-astra-edd-archive-layout-configs.php') diff --git a/inc/compatibility/edd/customizer/sections/layout/class-astra-edd-archive-layout-configs.php b/inc/compatibility/edd/customizer/sections/layout/class-astra-edd-archive-layout-configs.php new file mode 100644 index 0000000..bd770a9 --- /dev/null +++ b/inc/compatibility/edd/customizer/sections/layout/class-astra-edd-archive-layout-configs.php @@ -0,0 +1,214 @@ + ASTRA_THEME_SETTINGS . '[edd-archive-grids]', + 'type' => 'control', + 'control' => 'ast-responsive-slider', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ), + 'section' => 'section-edd-archive', + 'default' => astra_get_option( + 'edd-archive-grids', + array( + 'desktop' => 4, + 'tablet' => 3, + 'mobile' => 2, + ) + ), + 'priority' => 10, + 'title' => __( 'Archive Columns', 'astra' ), + 'input_attrs' => array( + 'step' => 1, + 'min' => 1, + 'max' => 6, + ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'transport' => 'postMessage', + ), + + /** + * Option: EDD Archive Post Meta + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', + 'type' => 'control', + 'control' => 'ast-sortable', + 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_multi_choices' ), + 'section' => 'section-edd-archive', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'default' => astra_get_option( 'edd-archive-product-structure' ), + 'priority' => 30, + 'title' => __( 'Product Structure', 'astra' ), + 'description' => __( 'The Image option cannot be sortable if the Product Style is selected to the List Style ', 'astra' ), + 'choices' => array( + 'image' => __( 'Image', 'astra' ), + 'category' => __( 'Category', 'astra' ), + 'title' => __( 'Title', 'astra' ), + 'price' => __( 'Price', 'astra' ), + 'short_desc' => __( 'Short Description', 'astra' ), + 'add_cart' => __( 'Add To Cart', 'astra' ), + ), + ), + + /** + * Option: Add to Cart button text + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-add-to-cart-button-text]', + 'type' => 'control', + 'control' => 'text', + 'section' => 'section-edd-archive', + 'default' => astra_get_option( 'edd-archive-add-to-cart-button-text' ), + 'priority' => 31, + 'title' => __( 'Cart Button Text', 'astra' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', + 'operator' => 'contains', + 'value' => 'add_cart', + ), + ), + ), + + /** + * Option: Variable product button + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-variable-button]', + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-edd-archive', + 'divider' => array( 'ast_class' => 'ast-bottom-divider ast-top-divider' ), + 'default' => astra_get_option( 'edd-archive-variable-button' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-product-structure]', + 'operator' => 'contains', + 'value' => 'add_cart', + ), + ), + 'priority' => 31, + 'title' => __( 'Variable Product Button', 'astra' ), + 'choices' => array( + 'button' => __( 'Button', 'astra' ), + 'options' => __( 'Options', 'astra' ), + ), + ), + + /** + * Option: Variable product button text + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-variable-button-text]', + 'type' => 'control', + 'control' => 'text', + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'section' => 'section-edd-archive', + 'default' => astra_get_option( 'edd-archive-variable-button-text' ), + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-variable-button]', + 'operator' => '==', + 'value' => 'button', + ), + ), + 'priority' => 31, + 'title' => __( 'Variable Product Button Text', 'astra' ), + ), + + /** + * Option: Archive Content Width + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-width]', + 'type' => 'control', + 'control' => 'ast-select', + 'section' => 'section-edd-archive', + 'default' => astra_get_option( 'edd-archive-width' ), + 'divider' => array( 'ast_class' => 'ast-bottom-divider' ), + 'priority' => 220, + 'title' => __( 'Archive Content Width', 'astra' ), + 'choices' => array( + 'default' => __( 'Default', 'astra' ), + 'custom' => __( 'Custom', 'astra' ), + ), + 'transport' => 'postMessage', + ), + + /** + * Option: Enter Width + */ + array( + 'name' => ASTRA_THEME_SETTINGS . '[edd-archive-max-width]', + 'type' => 'control', + 'control' => 'ast-slider', + 'section' => 'section-edd-archive', + 'default' => astra_get_option( 'edd-archive-max-width' ), + 'priority' => 225, + 'context' => array( + Astra_Builder_Helper::$general_tab_config, + array( + 'setting' => ASTRA_THEME_SETTINGS . '[edd-archive-width]', + 'operator' => '===', + 'value' => 'custom', + ), + ), + + 'title' => __( 'Custom Width', 'astra' ), + 'transport' => 'postMessage', + 'suffix' => 'px', + 'input_attrs' => array( + 'min' => 768, + 'step' => 1, + 'max' => 1920, + ), + ), + ); + + $configurations = array_merge( $configurations, $_configs ); + + return $configurations; + + } + } +} + +new Astra_Edd_Archive_Layout_Configs(); + -- cgit v1.2.3-60-g2f50