mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Coding Standards: Use strict comparison where strtolower() is involved.
Follow-up to [649], [7736], [18821], [19444], [20886], [20893], [23303], [55642], [55652], [55653], [55654]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. git-svn-id: https://develop.svn.wordpress.org/trunk@55677 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4194,7 +4194,10 @@ function wp_insert_post( $postarr, $wp_error = false, $fire_after_hooks = true )
|
||||
// On updates, we need to check to see if it's using the old, fixed sanitization context.
|
||||
$check_name = sanitize_title( $post_name, '', 'old-save' );
|
||||
|
||||
if ( $update && strtolower( urlencode( $post_name ) ) == $check_name && get_post_field( 'post_name', $post_id ) == $check_name ) {
|
||||
if ( $update
|
||||
&& strtolower( urlencode( $post_name ) ) === $check_name
|
||||
&& get_post_field( 'post_name', $post_id ) === $check_name
|
||||
) {
|
||||
$post_name = $check_name;
|
||||
} else { // New post, or slug has changed.
|
||||
$post_name = sanitize_title( $post_name );
|
||||
|
||||
Reference in New Issue
Block a user