From 31801715807dc0f07d00c55f7c8aa74041426832 Mon Sep 17 00:00:00 2001 From: desrosj Date: Tue, 16 Jan 2024 16:08:13 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/branches/6.4@57291 git-svn-id: http://core.svn.wordpress.org/branches/6.4@56797 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyseventeen/inc/icon-functions.php | 2 +- .../twentyseventeen/template-parts/post/content-audio.php | 2 +- .../twentyseventeen/template-parts/post/content-video.php | 2 +- wp-includes/version.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-content/themes/twentyseventeen/inc/icon-functions.php b/wp-content/themes/twentyseventeen/inc/icon-functions.php index b25428fb1d..82a1ebedcc 100644 --- a/wp-content/themes/twentyseventeen/inc/icon-functions.php +++ b/wp-content/themes/twentyseventeen/inc/icon-functions.php @@ -130,7 +130,7 @@ function twentyseventeen_nav_menu_social_icons( $item_output, $item, $depth, $ar // Change SVG icon inside social links menu if there is supported URL. if ( 'social' === $args->theme_location ) { foreach ( $social_icons as $attr => $value ) { - if ( str_contains( $item_output, $attr ) ) { + if ( false !== strpos( $item_output, $attr ) ) { $item_output = str_replace( $args->link_after, '' . twentyseventeen_get_svg( array( 'icon' => esc_attr( $value ) ) ), $item_output ); } } diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php b/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php index d50ce9f66a..eea60e6c7c 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-audio.php @@ -46,7 +46,7 @@ $audio = false; // Only get audio from the content if a playlist isn't present. - if ( ! str_contains( $content, 'wp-playlist-script' ) ) { + if ( false === strpos( $content, 'wp-playlist-script' ) ) { $audio = get_media_embedded_in_content( $content, array( 'audio' ) ); } diff --git a/wp-content/themes/twentyseventeen/template-parts/post/content-video.php b/wp-content/themes/twentyseventeen/template-parts/post/content-video.php index a5c387e767..fd7865db92 100644 --- a/wp-content/themes/twentyseventeen/template-parts/post/content-video.php +++ b/wp-content/themes/twentyseventeen/template-parts/post/content-video.php @@ -46,7 +46,7 @@ $video = false; // Only get video from the content if a playlist isn't present. - if ( ! str_contains( $content, 'wp-playlist-script' ) ) { + if ( false === strpos( $content, 'wp-playlist-script' ) ) { $video = get_media_embedded_in_content( $content, array( 'video', 'object', 'embed', 'iframe' ) ); } ?> diff --git a/wp-includes/version.php b/wp-includes/version.php index aafdf61986..371d74edc2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4.3-alpha-57288'; +$wp_version = '6.4.3-alpha-57291'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.