Skip to content

Commit fcac29b

Browse files
committed
PHPStan fix.
1 parent 64c341c commit fcac29b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

includes/core/classes/blocks/class-dropdown.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ public function apply_dropdown_attributes( string $block_content, array $block )
8080
if ( self::BLOCK_NAME === $block['blockName'] ) {
8181
$tag = new WP_HTML_Tag_Processor( $block_content );
8282

83-
if ( $tag->next_tag() && $tag->next_tag() ) {
83+
if (
84+
$tag->next_tag( array( 'tag_name' => 'div' ) ) &&
85+
$tag->next_tag( array( 'tag_name' => 'a' ) )
86+
) {
8487
$tag->set_attribute( 'data-wp-interactive', 'gatherpress' );
8588
$tag->set_attribute( 'data-wp-interactive', 'gatherpress' );
8689
$tag->set_attribute( 'data-wp-on--click', 'actions.toggleDropdown' );

0 commit comments

Comments
 (0)