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]. Props poena. See #60241. Built from https://develop.svn.wordpress.org/trunk@57275 git-svn-id: http://core.svn.wordpress.org/trunk@56781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9ddc1f9761
commit
91004791b9
|
@ -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.
|
// Change SVG icon inside social links menu if there is supported URL.
|
||||||
if ( 'social' === $args->theme_location ) {
|
if ( 'social' === $args->theme_location ) {
|
||||||
foreach ( $social_icons as $attr => $value ) {
|
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, '</span>' . twentyseventeen_get_svg( array( 'icon' => esc_attr( $value ) ) ), $item_output );
|
$item_output = str_replace( $args->link_after, '</span>' . twentyseventeen_get_svg( array( 'icon' => esc_attr( $value ) ) ), $item_output );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
$audio = false;
|
$audio = false;
|
||||||
|
|
||||||
// Only get audio from the content if a playlist isn't present.
|
// 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' ) );
|
$audio = get_media_embedded_in_content( $content, array( 'audio' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
$video = false;
|
$video = false;
|
||||||
|
|
||||||
// Only get video from the content if a playlist isn't present.
|
// 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' ) );
|
$video = get_media_embedded_in_content( $content, array( 'video', 'object', 'embed', 'iframe' ) );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.5-alpha-57274';
|
$wp_version = '6.5-alpha-57275';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue