Skip to content
Draft
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
Prev Previous commit
Next Next commit
Fix next_tag selector
  • Loading branch information
sirreal committed Nov 27, 2024
commit 62cc6d3889c171c88dada036443c2887a1b117b1
7 changes: 4 additions & 3 deletions src/wp-includes/class-wp-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,10 @@ private function replace_html( string $block_content, string $attribute_name, $s

foreach ( $selectors as $selector ) {
// If the current or any other tags match the selector, replace the HTML.
if ( strcasecmp( $block_reader->get_tag(), $selector ) === 0 || $block_reader->next_tag(
array( 'tag_name' => $selector )
) ) {
if (
strcasecmp( $block_reader->get_tag(), $selector ) === 0 ||
$block_reader->next_tag( $selector )
) {
$block_reader->release_bookmark( 'iterate-selectors' );
$block_reader->set_inner_html( wp_kses_post( $source_value ) );
return $block_reader->get_updated_html();
Expand Down