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:
parent
1634a10025
commit
fa14ed343d
|
@ -149,7 +149,8 @@ function get_category_by_path( $category_path, $full_match = true, $output = OBJ
|
||||||
foreach ( $categories as $category ) {
|
foreach ( $categories as $category ) {
|
||||||
$path = '/' . $leaf_path;
|
$path = '/' . $leaf_path;
|
||||||
$curcategory = $category;
|
$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' );
|
$curcategory = get_term( $curcategory->parent, 'category' );
|
||||||
|
|
||||||
if ( is_wp_error( $curcategory ) ) {
|
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;
|
$path = '/' . $curcategory->slug . $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $path == $full_path ) {
|
if ( $path === $full_path ) {
|
||||||
$category = get_term( $category->term_id, 'category', $output );
|
$category = get_term( $category->term_id, 'category', $output );
|
||||||
_make_cat_compat( $category );
|
_make_cat_compat( $category );
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue