Taxonomy: Correct some strict comparisons after [45710].
See #47573. git-svn-id: https://develop.svn.wordpress.org/trunk@45711 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bdcc896e2c
commit
69aa6b52ba
|
@ -1770,7 +1770,7 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
|
|||
$defaults = array();
|
||||
|
||||
if ( 'category' === $taxonomy ) {
|
||||
$defaults['default'] = get_option( 'default_category' );
|
||||
$defaults['default'] = (int) get_option( 'default_category' );
|
||||
if ( $defaults['default'] === $term ) {
|
||||
return 0; // Don't delete the default category
|
||||
}
|
||||
|
@ -3541,7 +3541,7 @@ function _get_term_children( $term_id, $terms, $taxonomy, &$ancestors = array()
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( $term->parent === $term_id ) {
|
||||
if ( (int) $term->parent === $term_id ) {
|
||||
if ( $use_id ) {
|
||||
$term_list[] = $term->term_id;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue