-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No longer misinterpret builder blocks as layouts #2966
- Loading branch information
1 parent
660085d
commit 05404af
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,15 @@ protected static function extractFromLayouts(array $input): array | |
return []; | ||
} | ||
|
||
if ( | ||
// no columns = no layout | ||
array_key_exists('columns', $input[0]) === false || | ||
// checks if this is a block for the builder plugin | ||
array_key_exists('_key', $input[0]) === true | ||
) { | ||
return $input; | ||
} | ||
|
||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bastianallgeier
Author
Member
|
||
// no layouts | ||
if (array_key_exists('columns', $input[0]) === false) { | ||
return $input; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Why do we repeat the same check below when using the OR operator?