Skip to content

Commit

Permalink
Merge pull request #934 from tomusborne/release/1.7.3
Browse files Browse the repository at this point in the history
Release: 1.7.3
  • Loading branch information
tomusborne authored Mar 6, 2023
2 parents 2ec8142 + 75ba788 commit e0b4e46
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 26 deletions.
2 changes: 1 addition & 1 deletion dist/blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-rich-text'), 'version' => 'ecdb0999dd4c9ddf0fdf');
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-rich-text'), 'version' => 'fc33cdae48a8ae3099c0');
18 changes: 9 additions & 9 deletions dist/blocks.js

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions includes/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,6 @@ function generateblocks_set_block_css_selectors( $selector, $name, $attributes )
* @return void
*/
function generateblocks_register_user_meta() {
$additional_properties = apply_filters(
'generateblocks_onboarding_user_meta_properties',
array()
);

register_meta(
'user',
GenerateBlocks_Rest::ONBOARDING_META_KEY,
Expand All @@ -417,7 +412,9 @@ function generateblocks_register_user_meta() {
'properties' => array(
'insert_inner_container' => array( 'type' => 'boolean' ),
),
'additionalProperties' => $additional_properties,
'additionalProperties' => array(
'type' => 'boolean',
),
),
),
)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generateblocks",
"version": "1.7.2",
"version": "1.7.3",
"private": true,
"description": "A small collection of lightweight WordPress blocks that can accomplish nearly anything.",
"author": "Tom Usborne",
Expand Down
4 changes: 2 additions & 2 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: A small collection of lightweight WordPress blocks that can accomplish nearly anything.
* Author: Tom Usborne
* Author URI: https://tomusborne.com
* Version: 1.7.2
* Version: 1.7.3
* Requires at least: 5.9
* Requires PHP: 5.6
* License: GPL2+
Expand All @@ -19,7 +19,7 @@
exit; // Exit if accessed directly.
}

define( 'GENERATEBLOCKS_VERSION', '1.7.2' );
define( 'GENERATEBLOCKS_VERSION', '1.7.3' );
define( 'GENERATEBLOCKS_DIR', plugin_dir_path( __FILE__ ) );
define( 'GENERATEBLOCKS_DIR_URL', plugin_dir_url( __FILE__ ) );

Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: blocks, gutenberg, container, headline, grid, columns, page builder, wysiw
Requires at least: 5.9
Tested up to: 6.1
Requires PHP: 5.6
Stable tag: 1.7.2
Stable tag: 1.7.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -83,6 +83,10 @@ GenerateBlocks was built to work hand-in-hand with [GeneratePress](https://gener

== Changelog ==

= 1.7.3 =
* Fix: REST API warnings
* Fix: Old block deprecations

= 1.7.2 =
* Fix: Non-registered onboarding keys were breaking root container
* Fix: Block styling in block theme templates
Expand Down
14 changes: 13 additions & 1 deletion src/blocks/button-container/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,22 @@ import {
applyFilters,
} from '@wordpress/hooks';

import { getBlockAttributes } from '../../block-context';
import buttonContainerContext from '../../block-context/button-container';

const allAttributes = Object.assign(
{},
getBlockAttributes(
blockAttributes,
buttonContainerContext,
generateBlocksDefaults.buttonContainer
),
);

const deprecated = [
// v1 of container block. Deprecated the gb-grid-column wrapper in save component.
{
attributes: blockAttributes,
attributes: allAttributes,
supports: {
anchor: false,
className: false,
Expand Down
14 changes: 13 additions & 1 deletion src/blocks/button/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,23 @@ import {
RichText,
} from '@wordpress/block-editor';

import { getBlockAttributes } from '../../block-context';
import buttonContext from '../../block-context/button';

const allAttributes = Object.assign(
{},
getBlockAttributes(
blockAttributes,
buttonContext,
generateBlocksDefaults.button
),
);

const deprecated = [
// v1 of button block.
{
attributes: {
...blockAttributes,
...allAttributes,
text: {
type: 'array',
source: 'children',
Expand Down
14 changes: 13 additions & 1 deletion src/blocks/container/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,22 @@ import {
InnerBlocks,
} from '@wordpress/block-editor';

import { getBlockAttributes } from '../../block-context';
import containerContext from '../../block-context/container';

const allAttributes = Object.assign(
{},
getBlockAttributes(
blockAttributes,
containerContext,
generateBlocksDefaults.container
),
);

const deprecated = [
// v1 of container block. Deprecated the gb-grid-column wrapper in save component.
{
attributes: blockAttributes,
attributes: allAttributes,
supports: {
align: false,
anchor: false,
Expand Down
14 changes: 13 additions & 1 deletion src/blocks/grid/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,22 @@ import {
InnerBlocks,
} from '@wordpress/block-editor';

import { getBlockAttributes } from '../../block-context';
import gridContext from '../../block-context/grid';

const allAttributes = Object.assign(
{},
getBlockAttributes(
blockAttributes,
gridContext,
generateBlocksDefaults.gridContainer
),
);

const deprecated = [
// v1 of container block. Deprecated the gb-grid-column wrapper in save component.
{
attributes: blockAttributes,
attributes: allAttributes,
supports: {
anchor: false,
className: false,
Expand Down
16 changes: 14 additions & 2 deletions src/blocks/headline/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,23 @@ import {
applyFilters,
} from '@wordpress/hooks';

import { getBlockAttributes } from '../../block-context';
import headlineContext from '../../block-context/headline';

const allAttributes = Object.assign(
{},
getBlockAttributes(
blockAttributes,
headlineContext,
generateBlocksDefaults.headline
),
);

const deprecated = [
// v2 - remove wrapper.
{
attributes: {
...blockAttributes,
...allAttributes,
content: {
type: 'array',
source: 'children',
Expand Down Expand Up @@ -99,7 +111,7 @@ const deprecated = [
// v1 - change default h2 to p.
{
attributes: {
...blockAttributes,
...allAttributes,
element: {
type: 'string',
default: 'p',
Expand Down

0 comments on commit e0b4e46

Please sign in to comment.