Skip to content

Commit 95e4f54

Browse files
authored
Merge pull request #375 from awesomemotive/hotfix/fix-warning-for-missing-post-content
Fix a warning happens with an empty post object
2 parents 0a82b81 + c296d42 commit 95e4f54

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

functions.php

Lines changed: 1 addition & 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.3.4' );
12+
define( 'BOTIGA_VERSION', '2.3.5' );
1313
}
1414

1515
// aThemes White Label Compatibility

inc/plugins/woocommerce/features/product-card.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ function botiga_page_has_woo_blocks() {
234234
*
235235
* @since 2.3.4
236236
*/
237-
return apply_filters( 'botiga_page_has_woo_blocks', $result, $post->post_content );
237+
return apply_filters( 'botiga_page_has_woo_blocks', $result, $post ? $post->post_content : '' );
238238
}
239239

240240
/**
@@ -269,7 +269,7 @@ function botiga_page_has_woo_shortcode() {
269269
*
270270
* @since 2.3.4
271271
*/
272-
return apply_filters( 'botiga_page_has_woo_shortcode', $result, $post->post_content );
272+
return apply_filters( 'botiga_page_has_woo_shortcode', $result, $post ? $post->post_content : '' );
273273
}
274274

275275
/**

readme.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Contributors: athemes
44
Tags: e-commerce, custom-menu, custom-logo, grid-layout, featured-images, right-sidebar, left-sidebar, custom-colors, editor-style, theme-options, threaded-comments, translation-ready, blog, one-column, two-columns, rtl-language-support, custom-background, custom-header, footer-widgets, post-formats, wide-blocks
55

66
Requires at least: 5.4
7-
Version: 2.3.3
7+
Version: 2.3.5
88
Tested up to: 6.8
99
Requires PHP: 7
10-
Stable tag: 2.3.4
10+
Stable tag: 2.3.5
1111
License: GNU General Public License v2 or later
1212
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1313

@@ -30,6 +30,9 @@ Launch your store with Botiga. A beautiful theme that is optimized for both the
3030
Botiga includes support for WooCommerce and for Infinite Scroll in Jetpack.
3131

3232
== Changelog ==
33+
= 2.3.5 =
34+
Fixed - Error appearing sometimes when the post content is empty.
35+
3336
= 2.3.4 =
3437
Fixed - Issue where botiga_nav_menu_link_attributes returned a new class attribute without preserving existing values
3538

style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Theme URI: https://athemes.com/theme/botiga/
44
Author: aThemes
55
Author URI: https://athemes.com
66
Description: Launch your store with Botiga. A beautiful theme that is optimized for both the block editor and Elementor. We proudly introduce Botiga, with a modern and clean design that will effortlessly match your brand. Botiga has been developed from the ground up with clean code for optimal performance. You’ll get a mobile-optimized theme that looks and works great on any device and comes with plenty of customization options as well. Discover the theme that will transform your online business.
7-
Version: 2.3.4
7+
Version: 2.3.5
88
Tested up to: 6.7
9-
Requires PHP: 7
9+
Requires PHP: 7.0
1010
License: GNU General Public License v2 or later
1111
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1212
Text Domain: botiga

0 commit comments

Comments
 (0)