Make WordPress Core


Ignore:
Timestamp:
01/12/2024 07:11:34 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty: Revert usage of str_contains() in theme files.

The theme supports WordPress 4.7 or later, while the polyfill for str_contains() only exists in WordPress 5.9 or later.

Follow-up to [55988], [57275].

Props poena.
See #60241.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/functions.php

    r56783 r57276  
    324324
    325325            // Add a style attribute with the height, or append the height to the style attribute if the style attribute already exists.
    326             if ( ! str_contains( $html, ' style=' ) ) {
     326            if ( false === strpos( $html, ' style=' ) ) {
    327327                $search[]  = '/(src=)/';
    328328                $replace[] = "style=\"height: {$logo_height}px;\" src=";
Note: See TracChangeset for help on using the changeset viewer.