Coding Standards: Use strict comparison in `wp-includes/class-wp-rewrite.php`.
Follow-up to [3638], [13689], [19743]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. Built from https://develop.svn.wordpress.org/trunk@56210 git-svn-id: http://core.svn.wordpress.org/trunk@55722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6fc3060a4e
commit
3eec0065e3
|
@ -1668,7 +1668,7 @@ class WP_Rewrite {
|
|||
$index = ! str_contains( $query, '?' ) ? strlen( $query ) : strpos( $query, '?' );
|
||||
$front = substr( $query, 0, $index );
|
||||
|
||||
$external = $front != $this->index;
|
||||
$external = $front !== $this->index;
|
||||
}
|
||||
|
||||
// "external" = it doesn't correspond to index.php.
|
||||
|
@ -1799,7 +1799,8 @@ class WP_Rewrite {
|
|||
if ( ! is_array( $args ) ) {
|
||||
$args = array( 'with_front' => $args );
|
||||
}
|
||||
if ( func_num_args() == 4 ) {
|
||||
|
||||
if ( func_num_args() === 4 ) {
|
||||
$args['ep_mask'] = func_get_arg( 3 );
|
||||
}
|
||||
|
||||
|
@ -1812,6 +1813,7 @@ class WP_Rewrite {
|
|||
'walk_dirs' => true,
|
||||
'endpoints' => true,
|
||||
);
|
||||
|
||||
$args = array_intersect_key( $args, $defaults );
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
|
||||
|
@ -1820,6 +1822,7 @@ class WP_Rewrite {
|
|||
} else {
|
||||
$struct = $this->root . $struct;
|
||||
}
|
||||
|
||||
$args['struct'] = $struct;
|
||||
|
||||
$this->extra_permastructs[ $name ] = $args;
|
||||
|
@ -1937,7 +1940,7 @@ class WP_Rewrite {
|
|||
* @param string $permalink_structure Permalink structure.
|
||||
*/
|
||||
public function set_permalink_structure( $permalink_structure ) {
|
||||
if ( $permalink_structure != $this->permalink_structure ) {
|
||||
if ( $this->permalink_structure !== $permalink_structure ) {
|
||||
$old_permalink_structure = $this->permalink_structure;
|
||||
update_option( 'permalink_structure', $permalink_structure );
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.3-beta3-56209';
|
||||
$wp_version = '6.3-beta3-56210';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue