Skip to content

Commit 0e8a615

Browse files
Product action wrap & react color picker
* Fix: Color picker input typing. * New: WooCommerce Product Wrap
1 parent 9da905b commit 0e8a615

9 files changed

Lines changed: 76 additions & 39 deletions

File tree

assets/js/admin/customizer.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

changelog.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
== 1.1.7 | 12th June 2023 ==
2+
* Fix: Color picker input typing.
3+
* New: WooCommerce Product Wrap
4+
15
== 1.1.6 | 20th May 2023 ==
26
* Fix: Color picker in border controls.
3-
* Fix: Pallet Color picker offscreen.
7+
* Fix: Palette Color picker offscreen.
48
* Fix: Footer widgets spacing.
59
* Fix: Issue with product buttons style.
610

functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @package Base
1010
*/
1111

12-
define( 'AVANAM_VERSION', '1.1.5' );
12+
define( 'AVANAM_VERSION', '1.1.7' );
1313
define( 'AVANAM_MINIMUM_WP_VERSION', '5.4' );
1414
define( 'AVANAM_MINIMUM_PHP_VERSION', '7.2' );
1515

inc/components/options/component.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public static function defaults() {
274274
'size' => array(
275275
'mobile' => '',
276276
'tablet' => '',
277-
'desktop' => 1.5,
277+
'desktop' => 1.8,
278278
),
279279
'unit' => array(
280280
'mobile' => 'em',
@@ -308,7 +308,7 @@ public static function defaults() {
308308
'variant' => '',
309309
'color' => 'palette4',
310310
),
311-
'sidebar_link_style' => 'normal',
311+
'sidebar_link_style' => 'plain',
312312
'sidebar_link_colors' => array(
313313
'color' => '',
314314
'hover' => '',
@@ -337,10 +337,10 @@ public static function defaults() {
337337
'highlight' => 'palette1',
338338
'highlight-alt' => 'palette2',
339339
'highlight-alt2' => 'palette9',
340-
'style' => 'standard',
340+
'style' => 'no-underline',
341341
),
342342
// Scroll To Top.
343-
'scroll_up' => false,
343+
'scroll_up' => true,
344344
'scroll_up_side' => 'right',
345345
'scroll_up_icon' => 'arrow-up',
346346
'scroll_up_icon_size' => array(
@@ -660,12 +660,12 @@ public static function defaults() {
660660
'main_left_center' => array(),
661661
'main_center' => array(),
662662
'main_right_center' => array(),
663-
'main_right' => array( 'navigation' ),
663+
'main_right' => array(),
664664
),
665665
'bottom' => array(
666666
'bottom_left' => array(),
667667
'bottom_left_center' => array(),
668-
'bottom_center' => array(),
668+
'bottom_center' => array( 'navigation' ),
669669
'bottom_right_center' => array(),
670670
'bottom_right' => array(),
671671
),
@@ -1376,7 +1376,7 @@ public static function defaults() {
13761376
'tablet' => true,
13771377
'mobile' => false,
13781378
),
1379-
'header_search_icon' => 'search',
1379+
'header_search_icon' => 'search2',
13801380
'header_search_style' => 'default',
13811381
'header_search_woo' => false,
13821382
'header_search_border' => array(
@@ -2256,7 +2256,7 @@ public static function defaults() {
22562256
),
22572257
'footer_html_link_style' => 'normal',
22582258
'footer_html_margin' => array(
2259-
'size' => array( '', '', '', '' ),
2259+
'size' => array( '0', '', '0', '' ),
22602260
'unit' => 'px',
22612261
'locked' => false,
22622262
),
@@ -2359,7 +2359,7 @@ public static function defaults() {
23592359
'enabled' => true,
23602360
),
23612361
'page_title_element_breadcrumb' => array(
2362-
'enabled' => false,
2362+
'enabled' => true,
23632363
'show_title' => true,
23642364
),
23652365
'page_title_element_meta' => array(
@@ -2421,7 +2421,7 @@ public static function defaults() {
24212421
'post_background' => '',
24222422
'post_content_background' => '',
24232423
'post_title' => true,
2424-
'post_title_layout' => 'normal',
2424+
'post_title_layout' => 'above',
24252425
'post_title_height' => array(
24262426
'size' => array(
24272427
'mobile' => '',
@@ -2538,7 +2538,7 @@ public static function defaults() {
25382538
'enabled' => true,
25392539
),
25402540
'post_title_element_breadcrumb' => array(
2541-
'enabled' => false,
2541+
'enabled' => true,
25422542
'show_title' => true,
25432543
),
25442544
'post_title_element_excerpt' => array(
@@ -2873,7 +2873,7 @@ public static function defaults() {
28732873
'product_archive_show_order' => true,
28742874
'product_archive_show_results_count' => true,
28752875
'product_archive_style' => 'action-on-hover',
2876-
'product_archive_image_hover_switch' => 'none',
2876+
'product_archive_image_hover_switch' => 'fade',
28772877
'product_archive_button_style' => 'text',
28782878
'product_archive_button_align' => false,
28792879
'product_archive_title' => true,
@@ -2896,7 +2896,7 @@ public static function defaults() {
28962896
'enabled' => true,
28972897
),
28982898
'product_archive_title_element_breadcrumb' => array(
2899-
'enabled' => false,
2899+
'enabled' => true,
29002900
'show_title' => true,
29012901
),
29022902
'product_archive_title_element_description' => array(
@@ -2938,9 +2938,9 @@ public static function defaults() {
29382938
'color' => '',
29392939
'hover' => '',
29402940
),
2941-
'product_archive_layout' => 'normal',
2942-
'product_archive_content_style' => 'boxed',
2943-
'product_archive_sidebar_id' => 'sidebar-primary',
2941+
'product_archive_layout' => 'left',
2942+
'product_archive_content_style' => 'unboxed',
2943+
'product_archive_sidebar_id' => 'sidebar-woocommerce-shop',
29442944
'product_archive_title_font' => array(
29452945
'size' => array(
29462946
'desktop' => '',
@@ -3019,8 +3019,8 @@ public static function defaults() {
30193019
'locked' => true,
30203020
),
30213021
// Product Controls.
3022-
'custom_quantity' => false,
3023-
'product_archive_mobile_columns' => 'default',
3022+
'custom_quantity' => true,
3023+
'product_archive_mobile_columns' => 'twocolumn',
30243024
'product_layout' => 'normal',
30253025
'product_content_style' => 'unboxed',
30263026
'product_vertical_padding' => 'show',
@@ -3069,7 +3069,7 @@ public static function defaults() {
30693069
'feature_5_icon' => 'shield_check',
30703070
),
30713071
'product_content_element_payments' => array(
3072-
'enabled' => false,
3072+
'enabled' => true,
30733073
'title' => __( 'GUARANTEED SAFE CHECKOUT', 'avanam' ),
30743074
'visa' => true,
30753075
'mastercard' => true,
@@ -3097,7 +3097,7 @@ public static function defaults() {
30973097
),
30983098
'product_tab_style' => 'normal',
30993099
'variation_direction' => 'horizontal',
3100-
'product_tab_title' => true,
3100+
'product_tab_title' => false,
31013101
'product_content_element_product_meta' => array(
31023102
'enabled' => true,
31033103
),
@@ -3239,7 +3239,7 @@ public static function defaults() {
32393239
// Header Cart.
32403240
'header_cart_label' => '',
32413241
'header_cart_show_total' => true,
3242-
'header_cart_style' => 'link',
3242+
'header_cart_style' => 'slide',
32433243
'header_cart_popup_side' => 'right',
32443244
'header_cart_icon' => 'shopping-bag',
32453245
'header_cart_icon_size' => array(
@@ -3248,7 +3248,7 @@ public static function defaults() {
32483248
),
32493249
'header_cart_color' => array(
32503250
'color' => '',
3251-
'hover' => '',
3251+
'hover' => 'palette1',
32523252
),
32533253
'header_cart_background' => array(
32543254
'color' => '',

inc/components/woocommerce/component.php

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,12 @@ public function initialize() {
108108
remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open' );
109109
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );
110110
// Image Link.
111+
add_action( 'woocommerce_before_shop_loop_item_title', array( $this, 'archive_loop_image_wrap_open' ), 1 );
111112
add_action( 'woocommerce_before_shop_loop_item_title', array( $this, 'archive_loop_image_link_open' ), 5 );
112113
add_action( 'woocommerce_before_shop_loop_item_title', array( $this, 'archive_loop_second_image' ), 30 );
113114
add_action( 'woocommerce_before_shop_loop_item_title', array( $this, 'archive_loop_image_link_close' ), 50 );
115+
add_action( 'woocommerce_before_shop_loop_item_title', array( $this, 'archive_loop_product_action' ), 90 );
116+
add_action( 'woocommerce_before_shop_loop_item_title', array( $this, 'archive_loop_image_wrap_close' ), 91 );
114117
// Content Wrap.
115118
add_action( 'woocommerce_shop_loop_item_title', array( $this, 'archive_content_wrap_start' ), 5 );
116119
add_action( 'woocommerce_after_shop_loop_item', array( $this, 'archive_content_wrap_end' ), 50 );
@@ -388,7 +391,11 @@ public function custom_block_html( $html, $data, $product ) {
388391
esc_html( $product->add_to_cart_text() ) . '' . webapp()->get_icon( 'arrow-right-alt' ) . '' . webapp()->get_icon( 'spinner' ) . '' . webapp()->get_icon( 'check' )
389392
);
390393
}
391-
$action_button = '<div class="wp-block-button wc-block-grid__product-add-to-cart">' . $cart_text . '</div>';
394+
$style_class = '';
395+
if ( webapp()->option( 'product_archive_button_style' ) ) {
396+
$style_class = 'style-'.webapp()->option( 'product_archive_button_style' );
397+
}
398+
$action_button = '<div class="wp-block-button wc-block-grid__product-add-to-cart '.$style_class.'">' . $cart_text . '</div>';
392399
$secondary_image_output = '';
393400
if ( 'none' !== $product_image_hover_style ) {
394401
if ( is_a( $product, 'WC_Product' ) ) {
@@ -1088,6 +1095,26 @@ public function get_archive_infinite_attributes() {
10881095
$attributes = '';
10891096
return apply_filters( 'base_product_archive_infinite_attributes', $attributes );
10901097
}
1098+
/**
1099+
* Insert the opening wrap for products image in the loop.
1100+
*/
1101+
public function archive_loop_image_wrap_open() {
1102+
echo '<div class="product-thumbnail">';
1103+
}
1104+
/**
1105+
* Insert the closing wrap for products image in the loop.
1106+
*/
1107+
public function archive_loop_image_wrap_close() {
1108+
echo '</div>';
1109+
}
1110+
/**
1111+
* Insert the closing anchor tag for products image in the loop.
1112+
*/
1113+
public function archive_loop_product_action() {
1114+
echo '<div class="product-actions">';
1115+
do_action( 'base_archive_loop_product_action_over_image' );
1116+
echo '</div>';
1117+
}
10911118
/**
10921119
* Insert the opening anchor tag for products image in the loop.
10931120
*/
@@ -1184,7 +1211,13 @@ public function archive_excerpt() {
11841211
* Wrap Action buttons.
11851212
*/
11861213
public function archive_action_wrap_start() {
1187-
echo '<div class="product-action-wrap">';
1214+
$class = '';
1215+
if ( webapp()->option( 'product_archive_button_style' ) ) {
1216+
$class = 'style-'.webapp()->option( 'product_archive_button_style' );
1217+
}
1218+
echo '<div class="product-action-wrap '.$class.'">';
1219+
1220+
do_action( 'base_archive_loop_product_action_inner' );
11881221
}
11891222
/**
11901223
* Close Action buttons wrap.

inc/customizer/react/src/common/color-picker-fields.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import color from 'react-color/lib/helpers/color'
1+
import * as color from 'react-color/lib/helpers/color'
22

33
import { EditableInput } from 'react-color/lib/components/common'
44
const {

languages/avanam.pot

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# This file is distributed under the GNU General Public License v3.0 (or later).
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: Avanam 1.1.5\n"
5+
"Project-Id-Version: Avanam 1.1.7\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/avanam\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <LL@li.org>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2023-05-20T09:19:28+00:00\n"
12+
"POT-Creation-Date: 2023-06-13T03:21:43+00:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.7.1\n"
1515
"X-Domain: avanam\n"
@@ -1214,21 +1214,21 @@ msgstr ""
12141214
msgid "The template tag method %1$s registered by theme component %2$s conflicts with an already registered template tag of the same name."
12151215
msgstr ""
12161216

1217-
#: inc/components/woocommerce/component.php:992
1217+
#: inc/components/woocommerce/component.php:999
12181218
msgid "Cart Summary"
12191219
msgstr ""
12201220

1221-
#: inc/components/woocommerce/component.php:1027
1221+
#: inc/components/woocommerce/component.php:1034
12221222
msgid "Update Profile Photo"
12231223
msgstr ""
12241224

1225-
#: inc/components/woocommerce/component.php:1300
1226-
#: inc/components/woocommerce/component.php:1312
1225+
#: inc/components/woocommerce/component.php:1333
1226+
#: inc/components/woocommerce/component.php:1345
12271227
msgid "List View"
12281228
msgstr ""
12291229

1230-
#: inc/components/woocommerce/component.php:1303
1231-
#: inc/components/woocommerce/component.php:1309
1230+
#: inc/components/woocommerce/component.php:1336
1231+
#: inc/components/woocommerce/component.php:1342
12321232
msgid "Grid View"
12331233
msgstr ""
12341234

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: translation-ready, two-columns, right-sidebar, left-sidebar, footer-widget
44
Requires at least: 5.4
55
Tested up to: 6.2
66
Requires PHP: 7.2
7-
Stable tag: 1.1.6
7+
Stable tag: 1.1.7
88
License: GNU General Public License v3.0 (or later)
99
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1010

style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Theme URI: https://avanam.org
44
Author: AvanamOrg
55
Author URI: https://avanam.org/
66
Description: This is starter WordPress theme called Avanam. Created for theme developers to start building beautiful WordPress themes using Avanam.
7-
Version: 1.1.6
7+
Version: 1.1.7
88
License: GNU General Public License v3.0 (or later)
99
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1010
Text Domain: avanam

0 commit comments

Comments
 (0)