Ticket #57923: 57923.diff
File 57923.diff, 1.2 KB (added by , 19 months ago) |
---|
-
src/wp-includes/taxonomy.php
2711 2711 * @param int $object_id The object to relate to. 2712 2712 * @param string|int|array $terms A single term slug, single term ID, or array of either term slugs or IDs. 2713 2713 * Will replace all existing related terms in this taxonomy. Passing an 2714 * empty valuewill remove all related terms.2714 * empty array will remove all related terms. 2715 2715 * @param string $taxonomy The context in which to relate the term to the object. 2716 2716 * @param bool $append Optional. If false will delete difference of terms. Default false. 2717 2717 * @return array|WP_Error Term taxonomy IDs of the affected terms or WP_Error on failure. … … 2725 2725 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); 2726 2726 } 2727 2727 2728 if ( empty( $terms ) ) { 2729 $terms = array(); 2730 } 2731 2728 2732 if ( ! is_array( $terms ) ) { 2729 2733 $terms = array( $terms ); 2730 2734 }