Skip to content

Commit

Permalink
Twenty Twenty-One: Revert usage of str_contains() in theme files.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SergeyBiryukov committed Jan 12, 2024
1 parent c59b7b1 commit 454f2bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 454f2bf

Please sign in to comment.