Skip to content

Commit adc90cc

Browse files
committed
Merge branch 'develop' into feat/block-styles
# Conflicts: # plugin.php # src/plugins/global-settings/editor-loader.js # src/plugins/global-settings/index.js
2 parents 9c4dd84 + 7d68db3 commit adc90cc

33 files changed

+325
-215
lines changed

e2e/tests/global-settings.spec.ts

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -116,71 +116,4 @@ test.describe( 'Global Settings', () => {
116116
await deleteRequest
117117
await expect( resetButton ).not.toBeVisible()
118118
} )
119-
120-
test( 'When a default block is created, adding the block should have the default block\'s attributes', async ( {
121-
page,
122-
editor,
123-
} ) => {
124-
await page.getByLabel( 'Stackable Design System' ).click()
125-
await page.getByRole( 'button', { name: 'Block Defaults' } ).click()
126-
127-
// Open the Default Text Block Editor
128-
const defaultBlockPagePromise = page.waitForEvent( 'popup' )
129-
130-
// Reset the block defaults first if it has been edited
131-
const resetButton = page.locator( '.components-panel__body', { hasText: 'Block Defaults' } ).locator( '.stk-block-default-control', { hasText: /^Text$/ } ).first().getByLabel( 'Reset' )
132-
133-
if ( await resetButton.isVisible() ) {
134-
await resetButton.click()
135-
}
136-
137-
const textBlock = page.locator( '.components-panel__body', { hasText: 'Block Defaults' } ).locator( '.stk-block-default-control', { hasText: /^Text$/ } ).first().getByLabel( 'Edit' )
138-
await textBlock.click()
139-
const defaultBlockPage = await defaultBlockPagePromise
140-
141-
// Set a color for the default Text Block
142-
await defaultBlockPage.locator( '.stk-color-palette-control .stk-control-content > .components-dropdown > .components-button' ).first().click()
143-
await defaultBlockPage.getByLabel( 'Hex color' ).fill( 'ff0000' )
144-
await defaultBlockPage.locator( '.stk-color-palette-control .stk-control-content > .components-dropdown > .components-button' ).first().click()
145-
146-
// The default timeout is 30s, extend it to 90s
147-
const updateRequest = defaultBlockPage.waitForResponse( response => response.url().includes( 'update_block_style' ) && response.request().method() === 'POST', { timeout: 90_000 } )
148-
149-
// In older WP versions, the button text is 'Update' instead of 'Save'
150-
if ( await defaultBlockPage.getByRole( 'button', {
151-
name: 'Save', exact: true, disabled: false,
152-
} ).isVisible() ) {
153-
await defaultBlockPage.getByRole( 'button', { name: 'Save', exact: true } ).click()
154-
} else if ( await defaultBlockPage.getByRole( 'button', { name: 'Update', disabled: false } ).isVisible() ) {
155-
await defaultBlockPage.getByRole( 'button', { name: 'Update' } ).click()
156-
}
157-
158-
// Make sure default block has been updated
159-
await ( await updateRequest ).finished()
160-
161-
// Insert a Stackable Text Block, and check if the color is the same as the one set in the default block
162-
const timeouts = [ 1_000, 5_000, 30_000 ]
163-
for ( const timeout of timeouts ) {
164-
try {
165-
await page.reload()
166-
await editor.insertBlock( {
167-
name: 'stackable/text',
168-
attributes: {
169-
text: 'test',
170-
},
171-
} )
172-
173-
await expect( editor.canvas.locator( '[data-type="stackable/text"] > .stk-block-text > p[role="textbox"]' ) ).toHaveCSS( 'color', 'rgb(255, 0, 0)' )
174-
break
175-
} catch ( e ) {
176-
// Ignore the error and try again because the default block might not be updated yet
177-
await page.waitForTimeout( timeout )
178-
}
179-
}
180-
181-
// Reset Default Block
182-
await page.getByLabel( 'Stackable Design System' ).click()
183-
await page.getByRole( 'button', { name: 'Block Defaults' } ).click()
184-
await page.locator( '.components-panel__body', { hasText: 'Block Defaults' } ).locator( '.stk-block-default-control', { hasText: /^Text$/ } ).first().getByLabel( 'Reset' ).click()
185-
} )
186119
} )

plugin.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
* Author: Gambit Technologies, Inc
77
* Author URI: http://gambit.ph
88
* Text Domain: stackable-ultimate-gutenberg-blocks
9-
* Version: 3.17.1
9+
* Version: 3.17.2
1010
*
1111
* @package Stackable
12+
* @fs_premium_only /freemius.php, /freemius/
1213
*/
1314

1415
// Exit if accessed directly.
@@ -24,7 +25,7 @@
2425

2526
defined( 'STACKABLE_SHOW_PRO_NOTICES' ) || define( 'STACKABLE_SHOW_PRO_NOTICES', true );
2627
defined( 'STACKABLE_BUILD' ) || define( 'STACKABLE_BUILD', 'free' );
27-
defined( 'STACKABLE_VERSION' ) || define( 'STACKABLE_VERSION', '3.17.1' );
28+
defined( 'STACKABLE_VERSION' ) || define( 'STACKABLE_VERSION', '3.17.2' );
2829
defined( 'STACKABLE_FILE' ) || define( 'STACKABLE_FILE', __FILE__ );
2930
defined( 'STACKABLE_I18N' ) || define( 'STACKABLE_I18N', 'stackable-ultimate-gutenberg-blocks' ); // Plugin slug.
3031
defined( 'STACKABLE_DESIGN_LIBRARY_URL' ) || define( 'STACKABLE_DESIGN_LIBRARY_URL', 'https://storage.googleapis.com/stackable-plugin-assets' ); // Design Library CDN URL
@@ -210,7 +211,9 @@ function is_frontend() {
210211
* Freemius.
211212
* This needs to be first.
212213
*/
213-
require_once( plugin_dir_path( __FILE__ ) . 'freemius.php' );
214+
if ( STACKABLE_BUILD !== 'free' ) {
215+
require_once( plugin_dir_path( __FILE__ ) . 'freemius.php' );
216+
}
214217

215218
/**
216219
* Block Initializer.
@@ -240,7 +243,6 @@ function is_frontend() {
240243
require_once( plugin_dir_path( __FILE__ ) . 'src/plugins/global-settings/color-schemes/index.php' );
241244
require_once( plugin_dir_path( __FILE__ ) . 'src/plugins/global-settings/preset-controls/index.php' );
242245
require_once( plugin_dir_path( __FILE__ ) . 'src/plugins/global-settings/block-styles/index.php' );
243-
require_once( plugin_dir_path( __FILE__ ) . 'src/custom-block-styles.php' );
244246
require_once( plugin_dir_path( __FILE__ ) . 'src/css-optimize.php' );
245247
require_once( plugin_dir_path( __FILE__ ) . 'src/compatibility/index.php' );
246248
if ( ! is_admin() ) {
@@ -276,8 +278,8 @@ function is_frontend() {
276278
require_once( plugin_dir_path( __FILE__ ) . 'src/welcome/notification-rate.php' );
277279
}
278280

279-
if ( sugb_fs()->is__premium_only() ) {
280-
if ( STACKABLE_BUILD === 'premium' ) {
281+
if ( STACKABLE_BUILD === 'premium' ) {
282+
if ( sugb_fs()->is__premium_only() ) {
281283
/**
282284
* Premium initialize code.
283285
*/
@@ -293,6 +295,7 @@ function is_frontend() {
293295
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/navigation-panel-pre-enabled.php' );
294296
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/font-awesome-version.php' );
295297
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/global-color-schemes.php' );
298+
require_once( plugin_dir_path( __FILE__ ) . 'src/deprecated/block-defaults.php' );
296299

297300
/**
298301
* V2 Deprecated

readme.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=== Stackable - Page Builder Gutenberg Blocks ===
2-
Contributors: bfintal, gambitph, freemius
2+
Contributors: bfintal, gambitph
33
Tags: blocks, gutenberg, gutenberg blocks, page builder, WordPress blocks
44
Requires at least: 6.5.5
55
Tested up to: 6.8.2
@@ -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=P3xG3t-QYjw]
21+
[youtube https://www.youtube.com/watch?v=xAOWZHAkG3E]
2222

2323
## Transform Gutenberg into a Page Builder.
2424

@@ -252,7 +252,7 @@ Add animations that will bring your site to life and make it more visually engag
252252

253253
= Minimum Requirements =
254254

255-
You'll need WordPress version 6.3 or higher for this to work.
255+
You'll need WordPress version 6.5.5 or higher for this to work.
256256

257257
== Frequently Asked Questions ==
258258

0 commit comments

Comments
 (0)