From 454f2bf0126fbc7de923d194fef760fb83a73728 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 12 Jan 2024 19:13:02 +0000 Subject: [PATCH] Twenty Twenty-One: Revert usage of `str_contains()` in theme files. The theme supports WordPress 5.3 or later, while the polyfill for `str_contains()` only exists in WordPress 5.9 or later. Follow-up to [55988], [57275], [57276]. Props poena. Fixes #60241. git-svn-id: https://develop.svn.wordpress.org/trunk@57277 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentytwentyone/inc/template-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentytwentyone/inc/template-functions.php b/src/wp-content/themes/twentytwentyone/inc/template-functions.php index 4924773dc1..8c8fcf33e1 100644 --- a/src/wp-content/themes/twentytwentyone/inc/template-functions.php +++ b/src/wp-content/themes/twentytwentyone/inc/template-functions.php @@ -445,7 +445,7 @@ function twenty_twenty_one_get_attachment_image_attributes( $attr, $attachment, return $attr; } - if ( isset( $attr['class'] ) && str_contains( $attr['class'], 'custom-logo' ) ) { + if ( isset( $attr['class'] ) && false !== strpos( $attr['class'], 'custom-logo' ) ) { return $attr; }