Make WordPress Core


Ignore:
Timestamp:
01/16/2024 04:06:41 PM (12 months ago)
Author:
desrosj
Message:

Twenty Seventeen: 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].

Merges [57275] to the 6.4 branch.

Props poena, SergeyBiryukov.
See #60241.

Location:
branches/6.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.4

  • branches/6.4/src/wp-content/themes/twentyseventeen/inc/icon-functions.php

    r55988 r57291  
    131131    if ( 'social' === $args->theme_location ) {
    132132        foreach ( $social_icons as $attr => $value ) {
    133             if ( str_contains( $item_output, $attr ) ) {
     133            if ( false !== strpos( $item_output, $attr ) ) {
    134134                $item_output = str_replace( $args->link_after, '</span>' . twentyseventeen_get_svg( array( 'icon' => esc_attr( $value ) ) ), $item_output );
    135135            }
Note: See TracChangeset for help on using the changeset viewer.