Skip to content

Commit 454f2bf

Browse files
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
1 parent c59b7b1 commit 454f2bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-content/themes/twentytwentyone/inc/template-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ function twenty_twenty_one_get_attachment_image_attributes( $attr, $attachment,
445445
return $attr;
446446
}
447447

448-
if ( isset( $attr['class'] ) && str_contains( $attr['class'], 'custom-logo' ) ) {
448+
if ( isset( $attr['class'] ) && false !== strpos( $attr['class'], 'custom-logo' ) ) {
449449
return $attr;
450450
}
451451

0 commit comments

Comments
 (0)