Skip to content

Commit 75af324

Browse files
Merge branch 'develop' into feat/generate-css-file
2 parents 645ea01 + 77fda6f commit 75af324

File tree

14 files changed

+3209
-3177
lines changed

14 files changed

+3209
-3177
lines changed

languages/stackable-ultimate-gutenberg-blocks.pot

Lines changed: 3087 additions & 3103 deletions
Large diffs are not rendered by default.

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stackable",
3-
"version": "3.18.0",
3+
"version": "3.18.1",
44
"private": true,
55
"description": "Blocks for everyone",
66
"author": "Benjamin Intal of Gambit",

plugin.php

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Author: Gambit Technologies, Inc
77
* Author URI: http://gambit.ph
88
* Text Domain: stackable-ultimate-gutenberg-blocks
9-
* Version: 3.18.0
9+
* Version: 3.18.1
1010
*
1111
* @package Stackable
1212
* @fs_premium_only /freemius.php, /freemius/
@@ -17,6 +17,27 @@
1717
exit;
1818
}
1919

20+
if ( ! function_exists( 'stackable_multiple_plugins_check' ) ) {
21+
// Prevent multiple Stackable plugin versions from being active simultaneously.
22+
function stackable_multiple_plugins_check() {
23+
if ( is_plugin_active( $GLOBALS['OTHER_STACKABLE_FILE'] ) ) {
24+
deactivate_plugins( $GLOBALS['OTHER_STACKABLE_FILE'] );
25+
}
26+
}
27+
}
28+
29+
if ( defined('STACKABLE_FILE') && STACKABLE_FILE !== __FILE__ && ! isset( $GLOBALS['OTHER_STACKABLE_FILE'] ) ) {
30+
// Get relative file path of the other Stackable version.
31+
$GLOBALS['OTHER_STACKABLE_FILE'] = plugin_basename( STACKABLE_FILE );
32+
33+
// Use a temporary option to store the other Stackable Plugin info needed for the admin notice. This will be deleted later.
34+
// Note: We cannot use add_action in the register_activation_hook callback so we use this temporary option.
35+
// See https://developer.wordpress.org/reference/functions/register_activation_hook/#process-flow for more info.
36+
add_option( 'stackable_other_stackable_plugin_info', [ 'BUILD' => STACKABLE_BUILD, 'VERSION' => STACKABLE_VERSION ] );
37+
38+
register_activation_hook( __FILE__, 'stackable_multiple_plugins_check' );
39+
}
40+
2041
// Freemius SDK: Auto deactivate the free version when activating the paid one.
2142
if ( function_exists( 'sugb_fs' ) ) {
2243
sugb_fs()->set_basename( true, __FILE__ );
@@ -25,7 +46,7 @@
2546

2647
defined( 'STACKABLE_SHOW_PRO_NOTICES' ) || define( 'STACKABLE_SHOW_PRO_NOTICES', true );
2748
defined( 'STACKABLE_BUILD' ) || define( 'STACKABLE_BUILD', 'free' );
28-
defined( 'STACKABLE_VERSION' ) || define( 'STACKABLE_VERSION', '3.18.0' );
49+
defined( 'STACKABLE_VERSION' ) || define( 'STACKABLE_VERSION', '3.18.1' );
2950
defined( 'STACKABLE_FILE' ) || define( 'STACKABLE_FILE', __FILE__ );
3051
defined( 'STACKABLE_I18N' ) || define( 'STACKABLE_I18N', 'stackable-ultimate-gutenberg-blocks' ); // Plugin slug.
3152
defined( 'STACKABLE_DESIGN_LIBRARY_URL' ) || define( 'STACKABLE_DESIGN_LIBRARY_URL', 'https://stackable-files.pages.dev' ); // Design Library CDN URL
@@ -158,6 +179,28 @@ function stackable_notice_gutenberg_plugin_ignore() {
158179
add_action( 'wp_ajax_stackable_notice_gutenberg_plugin_ignore', 'stackable_notice_gutenberg_plugin_ignore' );
159180
}
160181

182+
/**
183+
* Show notice if another Stackable plugin has been deactivated.
184+
*
185+
* @since 3.18.1
186+
*/
187+
if ( ! function_exists( 'stackable_notice_other_stackable_plugin_deactivated' ) ) {
188+
function stackable_notice_other_stackable_plugin_deactivated() {
189+
$OTHER_STACKABLE_INFO = get_option( 'stackable_other_stackable_plugin_info', false );
190+
if ( $OTHER_STACKABLE_INFO ) {
191+
printf(
192+
'<div class="notice notice-info is-dismissible stackable_notice_gutenberg_plugin"><p>%s</p></div>',
193+
sprintf( esc_html__( '%sStackable Notice%s: The Stackable plugin (%s version %s) has been deactivated. Only one active Stackable plugin is needed.', STACKABLE_I18N ), '<strong>', '</strong>', $OTHER_STACKABLE_INFO['BUILD'], $OTHER_STACKABLE_INFO['VERSION'] )
194+
);
195+
delete_option( 'stackable_other_stackable_plugin_info' );
196+
}
197+
}
198+
199+
if ( get_option( 'stackable_other_stackable_plugin_info', false ) ) {
200+
add_action( 'admin_notices', 'stackable_notice_other_stackable_plugin_deactivated' );
201+
}
202+
}
203+
161204
/********************************************************************************************
162205
* END Activation & PHP version checks.
163206
********************************************************************************************/

readme.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: blocks, gutenberg, gutenberg blocks, page builder, WordPress blocks
44
Requires at least: 6.5.5
55
Tested up to: 6.8.2
66
Requires PHP: 7.3
7-
Stable tag: 3.18.0
7+
Stable tag: 3.18.1
88
License: GPLv3
99
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1010

@@ -18,7 +18,7 @@ Custom Blocks that transform your WordPress Block Editor into a page builder
1818

1919
> [Try our live demo](https://wpstackable.com/demo/?utm_source=wp-repo&utm_campaign=readme&utm_medium=link) | [Join the Facebook Community](https://www.facebook.com/groups/wpstackable/)
2020

21-
[youtube https://www.youtube.com/watch?v=xAOWZHAkG3E]
21+
[youtube https://www.youtube.com/watch?v=ZSo3t1l5tHQ]
2222

2323
## Transform Gutenberg into a Page Builder.
2424

@@ -305,6 +305,13 @@ Nope. Stackable only works with Gutenberg, the new WordPress editor.
305305

306306
== Changelog ==
307307

308+
= 3.18.1 =
309+
* Fixed: Block styles - error encountered when creating divider and icon button block styles #3583
310+
* Fixed: Role Manager settings doesn't display when changing the site language #3565
311+
* Fixed: Auto-deactivate free/premium when another is acitvated and show an admin notice #3574
312+
* Fixed: Block styles - show the correct block title when deleting a style #387
313+
* Fixed: PHP error on stackable_add_welcome_notification when doing some REST API calls #3579
314+
308315
= 3.18.0 =
309316

310317
[Introducing: Global Block Styles](https://wpstackable.com/blog/introducing-block-styles/?utm_source=wp-repo&utm_campaign=readme&utm_medium=link)

src/block/divider/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,5 @@ export default compose(
137137
withBlockWrapperIsHovered,
138138
withQueryLoopContext,
139139
withBlockAttributeContext,
140-
withBlockStyleContext( blockStyles ),
140+
withBlockStyleContext( dividerStyles ),
141141
)( Edit )

src/block/icon-button/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,5 +121,5 @@ export default compose(
121121
withBlockWrapper,
122122
withQueryLoopContext,
123123
withBlockAttributeContext,
124-
withBlockStyleContext( blockStyles ),
124+
withBlockStyleContext( iconButtonStyles ),
125125
)( Edit )

src/components/design-library-list/editor.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.ugb-design-library-items {
22
page-break-inside: avoid;
33
break-inside: avoid;
4-
gap: 40px;
4+
gap: 30px;
55
display: grid;
66
grid-template-columns: 1fr 1fr 1fr;
77
align-items: center;
@@ -24,6 +24,7 @@
2424
}
2525
.ugb-modal-design-library__designs {
2626
overflow: auto;
27+
background: #f4f4f5;
2728
}
2829
.ugb-design-library-item {
2930
display: grid;
@@ -122,7 +123,7 @@
122123
// Toggle mode
123124
&.ugb-design-library-item--toggle footer {
124125
position: relative;
125-
padding: 16px 16px 24px;
126+
padding: 16px;
126127
display: flex;
127128
justify-content: space-between;
128129
> div {

0 commit comments

Comments
 (0)