Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -1869,8 +1869,12 @@
++$i;
continue;
}

$blocks_to_insert = parse_blocks( $pattern['content'] );

// Add the pattern name to make this a pattern instance in the editor.
if( count( $blocks_to_insert ) === 2 ) { // should be 1 but we seem to have an empty block always

Check failure on line 1875 in src/wp-includes/blocks.php

View workflow job for this annotation

GitHub Actions / Coding standards / PHP checks

Expected 1 space after IF keyword; 0 found

Check failure on line 1875 in src/wp-includes/blocks.php

View workflow job for this annotation

GitHub Actions / Coding standards / PHP checks

No space before opening parenthesis is prohibited

Check failure on line 1875 in src/wp-includes/blocks.php

View workflow job for this annotation

GitHub Actions / Coding standards / PHP checks

Space after opening control structure is required
Comment thread
ramonjd marked this conversation as resolved.
Outdated
$blocks_to_insert[0]['attrs']['metadata'] = [ 'patternName' => $slug, 'name' => $pattern['title'] ];

Check failure on line 1876 in src/wp-includes/blocks.php

View workflow job for this annotation

GitHub Actions / Coding standards / PHP checks

When a multi-item array uses associative keys, each value should start on a new line.

Check failure on line 1876 in src/wp-includes/blocks.php

View workflow job for this annotation

GitHub Actions / Coding standards / PHP checks

Short array syntax is not allowed
}
$seen_refs[ $slug ] = true;
$prev_inner_content = $inner_content;
$inner_content = null;
Expand Down
Loading