File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,20 +15,20 @@ public static function parseURLsDOMNode( \DOMNode $node ): \Iterator {
1515 if ( $ child instanceof \DOMElement ) {
1616 // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
1717 $ tag_name = strtolower ( $ child ->tagName );
18- }
19- switch ( $ tag_name ) {
20- case 'a ' :
21- case ' link ' :
22- yield $ child -> getAttribute ( ' href ' ) ;
23- break ;
24- case 'img ' :
25- case 'script ' :
26- case ' source ' :
27- yield $ child -> getAttribute ( ' src ' ) ;
28- break ;
29- }
30- foreach ( self :: parseURLsDOMNode ( $ child ) as $ url ) {
31- yield $ url ;
18+ switch ( $ tag_name ) {
19+ case ' a ' :
20+ case 'link ' :
21+ yield $ child -> getAttribute ( ' href ' );
22+ break ;
23+ case ' img ' :
24+ case 'script ' :
25+ case 'source ' :
26+ yield $ child -> getAttribute ( ' src ' );
27+ break ;
28+ }
29+ foreach ( self :: parseURLsDOMNode ( $ child ) as $ url ) {
30+ yield $ url ;
31+ }
3232 }
3333 }
3434 }
You can’t perform that action at this time.
0 commit comments