Skip to content

Commit

Permalink
Remove $args from empty block
Browse files Browse the repository at this point in the history
  • Loading branch information
ronilaukkarinen committed Dec 2, 2022
1 parent b92e2f6 commit 786a99c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.2.5: 2022-12-02

* Remove `$args` from empty block

### 1.2.4: 2022-11-28

* Ensure gravityformscli is only used for creating the form block, remove plugin after the form is created
Expand Down
2 changes: 1 addition & 1 deletion bin/newblock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Script specific vars
SCRIPT_LABEL='for macOS'
SCRIPT_VERSION='1.2.4 (2022-11-28)'
SCRIPT_VERSION='1.2.5 (2022-12-02)'

# Vars needed for this file to function globally
CURRENTFILE=`basename $0`
Expand Down
7 changes: 2 additions & 5 deletions bin/tasks/create-empty-block.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,8 @@ ${RED}Block already exists. The newtheme script will now quit...${TXTRESET}
namespace Air_Light;
if ( ! isset( \$args ) ) {
\$title = get_field( 'title' );
} else {
\$title = \$args['title'];
}
// Fields
\$title = get_field( 'title' );
if ( empty( \$title ) ) {
maybe_show_error_block( 'A title is required' );
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": "air-blocks",
"version": "1.2.0",
"version": "1.2.5",
"description": "Gutenberg block library powered by Air-light & dudestack.",
"author": "Digitoimisto Dude Oy (moro@dude.fi)",
"devDependencies": {
Expand Down

0 comments on commit 786a99c

Please sign in to comment.