diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index c747fe9426..3578b1d25e 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -803,7 +803,7 @@ function serialize_blocks( $blocks ) { function filter_block_content( $text, $allowed_html = 'post', $allowed_protocols = array() ) { $result = ''; - if ( false !== strpos( $text, '' ) ) { + if ( str_contains( $text, '' ) ) { $text = preg_replace_callback( '%%', '_filter_block_content_callback', $text ); } diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index dce33c19b2..19abf905b6 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -4463,8 +4463,9 @@ function esc_url( $url, $protocols = null, $_context = 'display' ) { * it needs http:// prepended (unless it's a relative link * starting with /, # or ?, or a PHP file). */ - if ( strpos( $url, ':' ) === false && ! in_array( $url[0], array( '/', '#', '?' ), true ) && - ! preg_match( '/^[a-z0-9-]+?\.php/i', $url ) ) { + if ( ! str_contains( $url, ':' ) && ! in_array( $url[0], array( '/', '#', '?' ), true ) && + ! preg_match( '/^[a-z0-9-]+?\.php/i', $url ) + ) { $url = 'http://' . $url; } diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 2fe4483a7a..b59a30ad22 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -222,7 +222,7 @@ function get_permalink( $post = 0, $leavename = false ) { ) { $category = ''; - if ( strpos( $permalink, '%category%' ) !== false ) { + if ( str_contains( $permalink, '%category%' ) ) { $cats = get_the_category( $post->ID ); if ( $cats ) { $cats = wp_list_sort( @@ -260,7 +260,7 @@ function get_permalink( $post = 0, $leavename = false ) { } $author = ''; - if ( strpos( $permalink, '%author%' ) !== false ) { + if ( str_contains( $permalink, '%author%' ) ) { $authordata = get_userdata( $post->post_author ); $author = $authordata->user_nicename; } @@ -502,7 +502,7 @@ function get_attachment_link( $post = null, $leavename = false ) { $name = $post->post_name; } - if ( strpos( $parentlink, '?' ) === false ) { + if ( ! str_contains( $parentlink, '?' ) ) { $link = user_trailingslashit( trailingslashit( $parentlink ) . '%postname%' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0c7435b0f4..1ef0504fe7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-56020'; +$wp_version = '6.3-alpha-56021'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.