diff --git a/lib/client-assets.php b/lib/client-assets.php index 5e4d2651bb603d..724cf26f9c4023 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -628,7 +628,7 @@ function gutenberg_extend_block_editor_preload_paths( $preload_paths, $post ) { $rest_base = ! empty( $post_type_object->rest_base ) ? $post_type_object->rest_base : $post_type_object->name; $autosaves_path = sprintf( '/wp/v2/%s/%d/autosaves?context=edit', $rest_base, $post->ID ); - if ( ! in_array( $autosaves_path, $preload_paths ) ) { + if ( ! in_array( $autosaves_path, $preload_paths, true ) ) { $preload_paths[] = $autosaves_path; } } @@ -644,7 +644,7 @@ function gutenberg_extend_block_editor_preload_paths( $preload_paths, $post ) { */ $blocks_path = array( '/wp/v2/blocks', 'OPTIONS' ); - if ( ! in_array( $blocks_path, $preload_paths ) ) { + if ( ! in_array( $blocks_path, $preload_paths, true ) ) { $preload_paths[] = $blocks_path; } diff --git a/packages/block-library/src/latest-posts/index.php b/packages/block-library/src/latest-posts/index.php index d90f692644bacb..de5ba210fb137e 100644 --- a/packages/block-library/src/latest-posts/index.php +++ b/packages/block-library/src/latest-posts/index.php @@ -51,7 +51,7 @@ function render_block_core_latest_posts( $attributes ) { } if ( isset( $attributes['displayPostContent'] ) && $attributes['displayPostContent'] - && isset( $attributes['displayPostContentRadio'] ) && 'excerpt' == $attributes['displayPostContentRadio'] ) { + && isset( $attributes['displayPostContentRadio'] ) && 'excerpt' === $attributes['displayPostContentRadio'] ) { $post_excerpt = $post->post_excerpt; if ( ! ( $post_excerpt ) ) { $post_excerpt = $post->post_content; @@ -77,7 +77,7 @@ function render_block_core_latest_posts( $attributes ) { } if ( isset( $attributes['displayPostContent'] ) && $attributes['displayPostContent'] - && isset( $attributes['displayPostContentRadio'] ) && 'full_post' == $attributes['displayPostContentRadio'] ) { + && isset( $attributes['displayPostContentRadio'] ) && 'full_post' === $attributes['displayPostContentRadio'] ) { $list_items_markup .= sprintf( '
%1$s
', wp_kses_post( html_entity_decode( $post->post_content, ENT_QUOTES, get_option( 'blog_charset' ) ) ) diff --git a/packages/block-library/src/rss/index.php b/packages/block-library/src/rss/index.php index 1bf217be3a9b59..53879d5bb2716b 100644 --- a/packages/block-library/src/rss/index.php +++ b/packages/block-library/src/rss/index.php @@ -69,7 +69,7 @@ function render_block_core_rss( $attributes ) { $excerpt = esc_attr( wp_trim_words( $excerpt, $attributes['excerptLength'], ' […]' ) ); // Change existing [...] to […]. - if ( '[...]' == substr( $excerpt, -5 ) ) { + if ( '[...]' === substr( $excerpt, -5 ) ) { $excerpt = substr( $excerpt, 0, -5 ) . '[…]'; }