diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 127f2919a1..7b12bf6c4c 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -345,7 +345,9 @@ function get_the_content( $more_link_text = null, $strip_teaser = false, $post = $content = array( $content ); } - if ( str_contains( $_post->post_content, '' ) && ( ! $elements['multipage'] || 1 == $elements['page'] ) ) { + if ( str_contains( $_post->post_content, '' ) + && ( ! $elements['multipage'] || 1 === $elements['page'] ) + ) { $strip_teaser = true; } @@ -978,11 +980,13 @@ function wp_link_pages( $args = '' ) { $output .= $parsed_args['before']; for ( $i = 1; $i <= $numpages; $i++ ) { $link = $parsed_args['link_before'] . str_replace( '%', $i, $parsed_args['pagelink'] ) . $parsed_args['link_after']; - if ( $i != $page || ! $more && 1 == $page ) { + + if ( $i !== $page || ! $more && 1 === $page ) { $link = _wp_link_page( $i ) . $link . ''; } elseif ( $i === $page ) { $link = '' . $link . ''; } + /** * Filters the HTML output of individual page number links. * @@ -1054,12 +1058,12 @@ function _wp_link_page( $i ) { $post = get_post(); $query_args = array(); - if ( 1 == $i ) { + if ( 1 === $i ) { $url = get_permalink(); } else { if ( ! get_option( 'permalink_structure' ) || in_array( $post->post_status, array( 'draft', 'pending' ), true ) ) { $url = add_query_arg( 'page', $i, get_permalink() ); - } elseif ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_on_front' ) == $post->ID ) { + } elseif ( 'page' === get_option( 'show_on_front' ) && (int) get_option( 'page_on_front' ) === $post->ID ) { $url = trailingslashit( get_permalink() ) . user_trailingslashit( "$wp_rewrite->pagination_base/" . $i, 'single_paged' ); } else { $url = trailingslashit( get_permalink() ) . user_trailingslashit( $i, 'single_paged' ); @@ -1815,7 +1819,7 @@ function is_page_template( $template = '' ) { return (bool) $page_template; } - if ( $template == $page_template ) { + if ( $template === $page_template ) { return true; } diff --git a/wp-includes/version.php b/wp-includes/version.php index bac8cf8ff1..e1aaa600aa 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58275'; +$wp_version = '6.6-alpha-58277'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.