Coding Standards: Use strict comparison in `wp-includes/category.php`.

Follow-up to [3511], [4173], [5525].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-06-05 11:16:18 +00:00
parent 1634a10025
commit fa14ed343d
2 changed files with 4 additions and 3 deletions

View File

@ -149,7 +149,8 @@ function get_category_by_path( $category_path, $full_match = true, $output = OBJ
foreach ( $categories as $category ) {
$path = '/' . $leaf_path;
$curcategory = $category;
while ( ( 0 != $curcategory->parent ) && ( $curcategory->parent != $curcategory->term_id ) ) {
while ( ( 0 !== $curcategory->parent ) && ( $curcategory->parent !== $curcategory->term_id ) ) {
$curcategory = get_term( $curcategory->parent, 'category' );
if ( is_wp_error( $curcategory ) ) {
@ -159,7 +160,7 @@ function get_category_by_path( $category_path, $full_match = true, $output = OBJ
$path = '/' . $curcategory->slug . $path;
}
if ( $path == $full_path ) {
if ( $path === $full_path ) {
$category = get_term( $category->term_id, 'category', $output );
_make_cat_compat( $category );

View File

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