Skip to content

Commit 150981a

Browse files
authored
Merge pull request #347 from athemes/develop
Version 2.3.0
2 parents 7af7e47 + 6e6cb9b commit 150981a

20 files changed

+674
-62
lines changed
5.79 KB
Loading
77.1 KB
Loading

assets/img/admin/people-easter.png

179 KB
Loading

assets/sass/plugins/woocommerce/_components.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1877,8 +1877,17 @@ dl.variation {
18771877
}
18781878
}
18791879

1880+
.botiga-product-video-anchor-link {
1881+
display: block;
1882+
1883+
.botiga-product-video {
1884+
pointer-events: none;
1885+
}
1886+
}
1887+
18801888
.botiga-product-video,
1881-
.botiga-product-audio {
1889+
.botiga-product-audio,
1890+
.botiga-product-video-anchor-link {
18821891
+ .loop-image-wrap,
18831892
+ .woocommerce-loop-product__link{
18841893
display: none !important;

functions.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
if ( ! defined( 'BOTIGA_VERSION' ) ) {
1111
// Replace the version number of the theme on each release.
12-
define( 'BOTIGA_VERSION', '2.2.18' );
12+
define( 'BOTIGA_VERSION', '2.3.0' );
1313
}
1414

1515
// aThemes White Label Compatibility
@@ -538,6 +538,13 @@ function botiga_deactivate_ele_onboarding() {
538538
require get_template_directory() . '/inc/plugins/woocommerce-eu-vat-compliance-premium/class-woocommerce-eu-vat-compliance-premium.php';
539539
}
540540

541+
/**
542+
* Load WP Rocket compatibility file.
543+
*/
544+
if ( defined( 'WP_ROCKET_VERSION' ) ) {
545+
require get_template_directory() . '/inc/plugins/wp-rocket/wp-rocket.php';
546+
}
547+
541548
/**
542549
* Upsell.
543550
*/

inc/classes/class-botiga-custom-css.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function __construct() {
5757
remove_action( 'wp_head', 'wp_custom_css_cb', 101 );
5858
}
5959

60-
add_action( 'customize_save_after', array( $this, 'update_custom_css_file' ) );
60+
add_action( 'customize_save_after', array( $this, 'update_custom_css_file_on_customizer_save_after_hook' ) );
6161
add_action( 'after_switch_theme', array( $this, 'update_custom_css_file' ) );
6262
add_action( 'upgrader_process_complete', array( $this, 'after_theme_update' ), 10, 2 );
6363

@@ -80,6 +80,25 @@ public function set_update_custom_css_flag() {
8080
set_transient( 'botiga_update_custom_css_flag', true, 0 );
8181
}
8282

83+
/**
84+
* Customizer update custom CSS file.
85+
*
86+
* @return void
87+
*/
88+
public function update_custom_css_file_on_customizer_save_after_hook() {
89+
90+
// If the hook 'init' has not been fired yet, set the flag to update the custom CSS file.
91+
// This is needed because the customizer_save_after hook might be fired before the init hook in some
92+
// situations. E.g when some extra plugin trigger it before the 'init' hook.
93+
//
94+
// The transient will be then set to true and the custom CSS file will be enqueued to be updated on the next 'init' hook.
95+
if ( ! did_action( 'init' ) ) {
96+
set_transient( 'botiga_update_custom_css_flag', true, 0 );
97+
}
98+
99+
$this->update_custom_css_file();
100+
}
101+
83102
/**
84103
* After theme update
85104
*

inc/classes/class-botiga-svg-icons.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ public static function get_svg_icon( $icon ) {
121121
'icon-spinner' => '<svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M10 3C6.13401 3 3 6.13401 3 10C3 10.2761 2.77614 10.5 2.5 10.5C2.22386 10.5 2 10.2761 2 10C2 5.58172 5.58172 2 10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C9.72386 18 9.5 17.7761 9.5 17.5C9.5 17.2239 9.72386 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3Z" fill="#212121"/></svg>',
122122

123123
'icon-lock-outline' => '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="48" height="48" aria-hidden="true" focusable="false"><path d="M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"></path></svg>',
124+
125+
'icon-xiaohongshu' => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M22.405 9.879c.002.016.01.02.07.019h.725a.797.797 0 0 0 .78-.972a.794.794 0 0 0-.884-.618a.795.795 0 0 0-.692.794c0 .101-.002.666.001.777m-11.509 4.808c-.203.001-1.353.004-1.685.003a2.5 2.5 0 0 1-.766-.126a.025.025 0 0 0-.03.014L7.7 16.127a.025.025 0 0 0 .01.032c.111.06.336.124.495.124c.66.01 1.32.002 1.981 0q.017 0 .023-.015l.712-1.545a.025.025 0 0 0-.024-.036zM.477 9.91c-.071 0-.076.002-.076.01l-.01.08c-.027.397-.038.495-.234 3.06c-.012.24-.034.389-.135.607c-.026.057-.033.042.003.112c.046.092.681 1.523.787 1.74c.008.015.011.02.017.02c.008 0 .033-.026.047-.044q.219-.282.371-.606c.306-.635.44-1.325.486-1.706c.014-.11.021-.22.03-.33l.204-2.616l.022-.293c.003-.029 0-.033-.03-.034zm7.203 3.757a1.4 1.4 0 0 1-.135-.607c-.004-.084-.031-.39-.235-3.06a.4.4 0 0 0-.01-.082c-.004-.011-.052-.008-.076-.008h-1.48c-.03.001-.034.005-.03.034l.021.293q.114 1.473.233 2.946c.05.4.186 1.085.487 1.706c.103.215.223.419.37.606c.015.018.037.051.048.049c.02-.003.742-1.642.804-1.765c.036-.07.03-.055.003-.112m3.861-.913h-.872a.126.126 0 0 1-.116-.178l1.178-2.625a.025.025 0 0 0-.023-.035l-1.318-.003a.148.148 0 0 1-.135-.21l.876-1.954a.025.025 0 0 0-.023-.035h-1.56q-.017 0-.024.015l-.926 2.068c-.085.169-.314.634-.399.938a.5.5 0 0 0-.02.191a.46.46 0 0 0 .23.378a1 1 0 0 0 .46.119h.59c.041 0-.688 1.482-.834 1.972a.5.5 0 0 0-.023.172a.47.47 0 0 0 .23.398c.15.092.342.12.475.12l1.66-.001q.017 0 .023-.015l.575-1.28a.025.025 0 0 0-.024-.035m-6.93-4.937H3.1a.032.032 0 0 0-.034.033c0 1.048-.01 2.795-.01 6.829c0 .288-.269.262-.28.262h-.74c-.04.001-.044.004-.04.047c.001.037.465 1.064.555 1.263c.01.02.03.033.051.033c.157.003.767.009.938-.014c.153-.02.3-.06.438-.132c.3-.156.49-.419.595-.765c.052-.172.075-.353.075-.533q.003-3.495-.007-6.991a.03.03 0 0 0-.032-.032zm11.784 6.896q-.002-.02-.024-.022h-1.465c-.048-.001-.049-.002-.05-.049v-4.66c0-.072-.005-.07.07-.07h.863c.08 0 .075.004.075-.074V8.393c0-.082.006-.076-.08-.076h-3.5c-.064 0-.075-.006-.075.073v1.445c0 .083-.006.077.08.077h.854c.075 0 .07-.004.07.07v4.624c0 .095.008.084-.085.084c-.37 0-1.11-.002-1.304 0c-.048.001-.06.03-.06.03l-.697 1.519s-.014.025-.008.036s.013.008.058.008q2.622.003 5.243.002c.03-.001.034-.006.035-.033zm4.177-3.43q0 .021-.02.024c-.346.006-.692.004-1.037.004q-.021-.003-.022-.024q-.006-.651-.01-1.303c0-.072-.006-.071.07-.07l.733-.003c.041 0 .081.002.12.015c.093.025.16.107.165.204c.006.431.002 1.153.001 1.153m2.67.244a1.95 1.95 0 0 0-.883-.222h-.18c-.04-.001-.04-.003-.042-.04V10.21q.001-.198-.025-.394a1.8 1.8 0 0 0-.153-.53a1.53 1.53 0 0 0-.677-.71a2.2 2.2 0 0 0-1-.258c-.153-.003-.567 0-.72 0c-.07 0-.068.004-.068-.065V7.76c0-.031-.01-.041-.046-.039H17.93s-.016 0-.023.007q-.008.008-.008.023v.546c-.008.036-.057.015-.082.022h-.95c-.022.002-.028.008-.03.032v1.481c0 .09-.004.082.082.082h.913c.082 0 .072.128.072.128v1.148s.003.117-.06.117h-1.482c-.068 0-.06.082-.06.082v1.445s-.01.068.064.068h1.457c.082 0 .076-.006.076.079v3.225c0 .088-.007.081.082.081h1.43c.09 0 .082.007.082-.08v-3.27c0-.029.006-.035.033-.035l2.323-.003a.7.7 0 0 1 .28.061a.46.46 0 0 1 .274.407c.008.395.003.79.003 1.185c0 .259-.107.367-.33.367h-1.218c-.023.002-.029.008-.028.033q.276.655.57 1.303a.05.05 0 0 0 .04.026c.17.005.34.002.51.003c.15-.002.517.004.666-.01a2 2 0 0 0 .408-.075c.59-.18.975-.698.976-1.313v-1.981q.001-.191-.034-.38c0 .078-.029-.641-.724-.998"/></svg>',
124126
);
125127
}
126128
}

inc/dashboard/html-patcher.php

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -309,17 +309,6 @@
309309
</a>
310310
</div>
311311
<?php endif; ?>
312-
<?php if ( defined( 'BOTIGA_PRO_VERSION' ) && ! defined( 'ATHEMES_PATCHER_VERSION' ) ) : ?>
313-
<div class="botiga-dashboard-alert botiga-dashboard-alert-warning botiga-dashboard-alert-with-icon botiga-dashboard-alert-with-upsell-link">
314-
<div class="alert-icon">
315-
<svg height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><title/><path d="M85.57,446.25H426.43a32,32,0,0,0,28.17-47.17L284.18,82.58c-12.09-22.44-44.27-22.44-56.36,0L57.4,399.08A32,32,0,0,0,85.57,446.25Z" fill="none" stroke="#000" stroke-linecap="rounded" stroke-width="32" stroke-linejoin="round" /><path d="M250.26,195.39l5.74,122,5.73-121.95a5.74,5.74,0,0,0-5.79-6h0A5.74,5.74,0,0,0,250.26,195.39Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" /><path d="M256,397.25a20,20,0,1,1,20-20A20,20,0,0,1,256,397.25Z"/></svg>
316-
</div>
317-
<p class="bt-text-color-grey"><?php echo esc_html__( 'Please note that to use this feature you need to install and activate the aThemes Patcher plugin.', 'botiga' ); ?></p>
318-
<a href="#" class="botiga-dashboard-link botiga-dashboard-link-succes botiga-dashboard-external-link botiga-install-plugin" data-type="external" data-plugin-url="https://patcher.athemes.com/athemes-patcher.zip?nocache=<?php echo esc_attr( time() ); ?>" data-plugin-name="athemes-patcher/athemes-patcher.php" data-redirect-to="<?php echo esc_url( add_query_arg('page', 'athemes-patcher-bp', admin_url('admin.php')) ); ?>">
319-
<?php echo esc_html__( 'Install and Activate aThemes Patcher', 'botiga' ); ?>
320-
</a>
321-
</div>
322-
<?php endif; ?>
323312

324313
<div data-wp-c16t="true" data-wp-component="Card" class="components-surface components-card athemes-patcher-card css-1hdyajo css-1otwcjs e19lxcc00">
325314
<div class="css-10klw3m e19lxcc00">
@@ -351,10 +340,16 @@
351340
<td>#467</td>
352341
<td>Improved performance when loading custom assets during page transitions.</td>
353342
<td>
354-
<a class="components-button has-lock-icon css-adm54n botiga-dashboard-pro-tooltip" href="https://athemes.com/botiga-upgrade?utm_source=athemes-patcher&utm_medium=link&utm_campaign=Botiga" target="_blank" data-tooltip-message="<?php echo esc_attr__( 'This is only available on Botiga Pro', 'botiga' ); ?>">
355-
Apply
356-
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="48" height="48" aria-hidden="true" focusable="false"><path d="M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"></path></svg>
357-
</a>
343+
<?php if ( defined( 'BOTIGA_PRO_VERSION' ) && ! defined( 'ATHEMES_PATCHER_VERSION' ) ) : ?>
344+
<a class="components-button has-lock-icon css-adm54n botiga-dashboard-pro-tooltip botiga-install-plugin" href="https://athemes.com/botiga-upgrade?utm_source=athemes-patcher&utm_medium=link&utm_campaign=Botiga" target="_blank" data-tooltip-message="<?php echo esc_attr__( 'This will install and activate the aThemes Patcher plugin', 'botiga' ); ?>" data-type="external" data-plugin-url="https://patcher.athemes.com/athemes-patcher.zip?nocache=<?php echo esc_attr( time() ); ?>" data-plugin-name="athemes-patcher/athemes-patcher.php" data-redirect-to="<?php echo esc_url( add_query_arg('page', 'athemes-patcher-bp', admin_url('admin.php')) ); ?>">
345+
Install Patcher
346+
</a>
347+
<?php else : ?>
348+
<a class="components-button has-lock-icon css-adm54n botiga-dashboard-pro-tooltip" href="https://athemes.com/botiga-upgrade?utm_source=athemes-patcher&utm_medium=link&utm_campaign=Botiga" target="_blank" data-tooltip-message="<?php echo esc_attr__( 'This is only available on Botiga Pro', 'botiga' ); ?>">
349+
Apply
350+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="48" height="48" aria-hidden="true" focusable="false"><path d="M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"></path></svg>
351+
</a>
352+
<?php endif; ?>
358353
</td>
359354
</tr>
360355
<tr>

inc/modules/hf-builder/class-header-footer-builder.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,12 +1348,17 @@ public static function get_responsive_css( $setting = '', $defaults = array(), $
13481348
foreach ( $devices as $device => $media ) {
13491349
$mod = get_theme_mod( $setting . '_' . $device, $defaults[$device] );
13501350
$mod = self::convert_column_css_value( $mod );
1351-
1351+
13521352
if( $row && $column ) {
13531353

13541354
// Get 'Inner Layout' to check and convert according to its value.
13551355
$inner_layout = get_theme_mod( $column . '_inner_layout' . '_' . $device, $default );
13561356

1357+
// Inline.
1358+
if ( $inner_layout === 'inline' ) {
1359+
$new_css_prop = $css_prop;
1360+
}
1361+
13571362
// Stack.
13581363
if( $inner_layout === 'stack' ) {
13591364

@@ -1375,7 +1380,6 @@ public static function get_responsive_css( $setting = '', $defaults = array(), $
13751380
} elseif( $css_prop === 'margin-top' ) {
13761381
$new_css_prop = 'margin-left';
13771382
}
1378-
13791383
}
13801384

13811385
if( ! $unit ) {

inc/notices/class-botiga-campaign.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Botiga_Campaign_Notice {
1818
*
1919
* @var string
2020
*/
21-
private $end_date_target = '2024-12-01';
21+
private $end_date_target = '2025-04-21';
2222

2323
/**
2424
* Constructor
@@ -56,7 +56,9 @@ public function add_inline_style() {
5656
5757
.botiga-campaign-notice {
5858
position: relative !important;
59-
background-color: #000;
59+
background: url(". esc_url( get_template_directory_uri() . '/assets/img/admin/easter-background.jpg' ) .");
60+
background-size: cover;
61+
background-position: center;
6062
padding: 30px 30px 0px !important;
6163
border-left: 0;
6264
}
@@ -68,7 +70,7 @@ public function add_inline_style() {
6870
}
6971
7072
.botiga-campaign-notice h3 {
71-
color: #FFF;
73+
color: #212121;
7274
font-size: 42px;
7375
font-weight: 700;
7476
line-height: 1.1;
@@ -77,7 +79,7 @@ public function add_inline_style() {
7779
7880
@media(min-width: 576px) {
7981
.botiga-campaign-notice h3 {
80-
min-width: 455px;
82+
min-width: 425px;
8183
max-width: 25%;
8284
line-height: 0.8;
8385
}
@@ -89,7 +91,7 @@ public function add_inline_style() {
8991
display: inline-flex;
9092
align-items: center;
9193
gap: 10px;
92-
color: #FFDB12;
94+
color: #68B43A;
9395
}
9496
9597
.botiga-campaign-notice-thumbnail {
@@ -128,7 +130,7 @@ public function add_inline_style() {
128130
129131
.botiga-campaign-notice .notice-dismiss,
130132
.botiga-campaign-notice .notice-dismiss:before {
131-
color: #FFF;
133+
color: #212121;
132134
}
133135
134136
.botiga-campaign-notice .notice-dismiss:active:before,
@@ -149,7 +151,7 @@ public function add_inline_style() {
149151
public function is_dismissed() {
150152
$user_id = get_current_user_id();
151153

152-
return get_user_meta( $user_id, 'botiga_disable_review_notice', true ) ? true : false;
154+
return get_user_meta( $user_id, 'botiga_disable_easter2025_notice', true ) ? true : false;
153155
}
154156

155157
/**
@@ -197,13 +199,13 @@ public function review_notice_markup() {
197199
<div class="botiga-notice notice botiga-campaign-notice" style="position:relative;">
198200
<h3><?php echo wp_kses_post( sprintf(
199201
/* Translators: 1. Image url. */
200-
__( 'Botiga Black Friday: Up to <span><img src="%1$s" class="botiga-campaign-notice-percent" alt="Up to 40 Percent Off!" /> Off!</span>', 'botiga' ),
201-
get_template_directory_uri() . '/assets/img/admin/40-percent.png'
202+
__( 'Botiga Easter Sale: Up to <span><img src="%1$s" class="botiga-campaign-notice-percent" alt="Up to 30 Percent Off!" /> Off!</span>', 'botiga' ),
203+
get_template_directory_uri() . '/assets/img/admin/30-percent-green.png'
202204
) ); ?></h3>
203205

204-
<a href="https://athemes.com/black-friday/?utm_source=theme_notice&utm_medium=button&utm_campaign=Botiga#botiga-pro" class="botiga-btn botiga-btn-primary" target="_blank"><?php esc_html_e( 'Give Me This Deal', 'botiga' ); ?></a>
206+
<a href="https://athemes.com/pricing/?utm_source=theme_notice&utm_content=easter-notice&utm_medium=button&utm_campaign=Botiga#botiga-pro" class="botiga-btn botiga-btn-primary" target="_blank"><?php esc_html_e( 'Give Me This Deal', 'botiga' ); ?></a>
205207

206-
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/img/admin/people-trust.png' ); ?>" alt="<?php echo esc_attr__( 'Ready to join 130,000+ WordPress creators who\'ve found their perfect match?', 'botiga' ); ?>" class="botiga-campaign-notice-thumbnail" />
208+
<img src="<?php echo esc_url( get_template_directory_uri() . '/assets/img/admin/people-easter.png' ); ?>" alt="<?php echo esc_attr__( 'Ready to join 130,000+ WordPress creators who\'ve found their perfect match?', 'botiga' ); ?>" class="botiga-campaign-notice-thumbnail" />
207209

208210
<a class="notice-dismiss" href="?page=botiga-dashboard&nag_botiga_disable_campaign_notice=0" style="text-decoration:none;"></a>
209211
</div>
@@ -217,7 +219,7 @@ public function review_notice_markup() {
217219
public function dismiss_notice_handler() {
218220
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, Universal.Operators.StrictComparisons.LooseEqual
219221
if ( isset( $_GET['nag_botiga_disable_campaign_notice'] ) && '0' == $_GET['nag_botiga_disable_campaign_notice'] ) {
220-
add_user_meta( get_current_user_id(), 'botiga_disable_review_notice', 'true', true );
222+
add_user_meta( get_current_user_id(), 'botiga_disable_easter2025_notice', 'true', true );
221223
}
222224
}
223225
}

0 commit comments

Comments
 (0)