Changeset 47219 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 02/09/2020 04:52:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r47205 r47219 224 224 225 225 if ( is_object( $object ) ) { 226 if ( $object->post_type === 'attachment') {226 if ( 'attachment' === $object->post_type ) { 227 227 return get_attachment_taxonomies( $object, $output ); 228 228 } … … 881 881 $_term->filter( $filter ); 882 882 883 if ( $output === ARRAY_A) {883 if ( ARRAY_A === $output ) { 884 884 return $_term->to_array(); 885 } elseif ( $output === ARRAY_N) {885 } elseif ( ARRAY_N === $output ) { 886 886 return array_values( $_term->to_array() ); 887 887 } … … 2012 2012 foreach ( $taxonomies as $index => $taxonomy ) { 2013 2013 $t = get_taxonomy( $taxonomy ); 2014 if ( isset( $t->args ) && is_array( $t->args ) && $args != array_merge( $args, $t->args )) {2014 if ( isset( $t->args ) && is_array( $t->args ) && array_merge( $args, $t->args ) != $args ) { 2015 2015 unset( $taxonomies[ $index ] ); 2016 2016 $terms = array_merge( $terms, wp_get_object_terms( $object_ids, $taxonomy, array_merge( $args, $t->args ) ) ); … … 3151 3151 } 3152 3152 3153 if ( $object_types == array_filter( $object_types, 'post_type_exists' )) {3153 if ( array_filter( $object_types, 'post_type_exists' ) == $object_types ) { 3154 3154 // Only post types are attached to this taxonomy. 3155 3155 _update_post_term_count( $terms, $taxonomy ); … … 4036 4036 4037 4037 foreach ( array( 'default_category', 'default_link_category', 'default_email_category' ) as $option ) { 4038 if ( $term_id === (int) get_option( $option, -1 )) {4038 if ( (int) get_option( $option, -1 ) === $term_id ) { 4039 4039 update_option( $option, $new_term_id ); 4040 4040 }
Note: See TracChangeset
for help on using the changeset viewer.