Coding Standards: Use strict comparison in wp_check_for_changed_slugs().

Follow-up to [4556], [4637], [34685].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
Built from https://develop.svn.wordpress.org/trunk@59584


git-svn-id: http://core.svn.wordpress.org/trunk@58970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2025-01-07 15:48:20 +00:00
parent 6f4f3aa934
commit 70b6f54551
2 changed files with 5 additions and 3 deletions

View File

@ -7207,12 +7207,14 @@ function wp_mime_type_icon( $mime = 0, $preferred_ext = '.png' ) {
*/
function wp_check_for_changed_slugs( $post_id, $post, $post_before ) {
// Don't bother if it hasn't changed.
if ( $post->post_name == $post_before->post_name ) {
if ( $post->post_name === $post_before->post_name ) {
return;
}
// We're only concerned with published, non-hierarchical objects.
if ( ! ( 'publish' === $post->post_status || ( 'attachment' === get_post_type( $post ) && 'inherit' === $post->post_status ) ) || is_post_type_hierarchical( $post->post_type ) ) {
if ( ! ( 'publish' === $post->post_status || ( 'attachment' === $post->post_type && 'inherit' === $post->post_status ) )
|| is_post_type_hierarchical( $post->post_type )
) {
return;
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-alpha-59583';
$wp_version = '6.8-alpha-59584';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.