Make WordPress Core


Ignore:
Timestamp:
01/14/2022 11:00:35 AM (3 years ago)
Author:
audrasjb
Message:

Media: Add a missing / in post thumbnail lazy loading regex.

This change avoids a warning thrown by a missing slash in a post thumbnail lazyload related regular expression.

Follow-up to [52065].

Props SierraTR, audrasjb, costdev.
Fixes #54815.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-thumbnail-template.php

    r52204 r52574  
    196196        } elseif ( is_array( $attr ) && ! array_key_exists( 'loading', $attr ) ) {
    197197            $attr['loading'] = $loading;
    198         } elseif ( is_string( $attr ) && ! preg_match( '/(^|&)loading=', $attr ) ) {
     198        } elseif ( is_string( $attr ) && ! preg_match( '/(^|&)loading=/', $attr ) ) {
    199199            $attr .= '&loading=' . $loading;
    200200        }
Note: See TracChangeset for help on using the changeset viewer.