Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
franck-paul committed Oct 20, 2023
1 parent 8e4e4e3 commit c4ad398
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FrontendBehaviors.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function publicAfterContentFilter(string $tag, array $args): strin

// Look for img or iframe in content ($args[0])
// Code adapted from WP Lazy Loading plugin (see https://github.com/WordPress/wp-lazy-loading)
$args[0] = preg_replace_callback('/<(img|iframe)\s[^>]+/', function ($matches) {
$args[0] = preg_replace_callback('/<(img|iframe)\s[^>]+/', function (array $matches) { // @phpstan-ignore-line
// Look if a loading attribute is already here or not
if (!preg_match('/\sloading\s*=/', $matches[0])) {
$buffer = ' loading="lazy"';
Expand Down

0 comments on commit c4ad398

Please sign in to comment.