Twenty Twenty: 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], [57275]. Props poena. See #60241. Built from https://develop.svn.wordpress.org/trunk@57276 git-svn-id: http://core.svn.wordpress.org/trunk@56782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
91004791b9
commit
93a75784b7
|
@ -80,7 +80,7 @@ if ( $comments ) {
|
|||
$pagination_classes = '';
|
||||
|
||||
// If we're only showing the "Next" link, add a class indicating so.
|
||||
if ( ! str_contains( $comment_pagination, 'prev page-numbers' ) ) {
|
||||
if ( false === strpos( $comment_pagination, 'prev page-numbers' ) ) {
|
||||
$pagination_classes = ' only-next';
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -323,7 +323,7 @@ function twentytwenty_get_custom_logo( $html ) {
|
|||
);
|
||||
|
||||
// Add a style attribute with the height, or append the height to the style attribute if the style attribute already exists.
|
||||
if ( ! str_contains( $html, ' style=' ) ) {
|
||||
if ( false === strpos( $html, ' style=' ) ) {
|
||||
$search[] = '/(src=)/';
|
||||
$replace[] = "style=\"height: {$logo_height}px;\" src=";
|
||||
} else {
|
||||
|
|
|
@ -37,12 +37,12 @@ $posts_pagination = get_the_posts_pagination(
|
|||
);
|
||||
|
||||
// If we're not outputting the previous page link, prepend a placeholder with `visibility: hidden` to take its place.
|
||||
if ( ! str_contains( $posts_pagination, 'prev page-numbers' ) ) {
|
||||
if ( false === strpos( $posts_pagination, 'prev page-numbers' ) ) {
|
||||
$posts_pagination = str_replace( '<div class="nav-links">', '<div class="nav-links"><span class="prev page-numbers placeholder" aria-hidden="true">' . $prev_text . '</span>', $posts_pagination );
|
||||
}
|
||||
|
||||
// If we're not outputting the next page link, append a placeholder with `visibility: hidden` to take its place.
|
||||
if ( ! str_contains( $posts_pagination, 'next page-numbers' ) ) {
|
||||
if ( false === strpos( $posts_pagination, 'next page-numbers' ) ) {
|
||||
$posts_pagination = str_replace( '</div>', '<span class="next page-numbers placeholder" aria-hidden="true">' . $next_text . '</span></div>', $posts_pagination );
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-alpha-57275';
|
||||
$wp_version = '6.5-alpha-57276';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue