Make WordPress Core


Ignore:
Timestamp:
07/02/2014 01:27:07 AM (12 years ago)
Author:
SergeyBiryukov
Message:

Clarify the docs and add more unit tests for wp_set_object_terms().

props DrewAPicture.
fixes #26570.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r28902 r28951  
    26182618 * @uses wp_remove_object_terms()
    26192619 *
    2620  * @param int $object_id The object to relate to.
    2621  * @param array|int|string $terms The slug or id of the term, will replace all existing
    2622  * related terms in this taxonomy.
    2623  * @param array|string $taxonomy The context in which to relate the term to the object.
    2624  * @param bool $append If false will delete difference of terms.
    2625  * @return array|WP_Error Affected Term IDs
    2626  */
    2627 function wp_set_object_terms($object_id, $terms, $taxonomy, $append = false) {
     2620 * @param int              $object_id The object to relate to.
     2621 * @param array|int|string $terms     A single term slug, single term id, or array of either term slugs or ids.
     2622 *                                    Will replace all existing related terms in this taxonomy.
     2623 * @param array|string     $taxonomy The context in which to relate the term to the object.
     2624 * @param bool             $append    If false will delete difference of terms.
     2625 * @return array|WP_Error Affected Term IDs.
     2626 */
     2627function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) {
    26282628    global $wpdb;
    26292629
Note: See TracChangeset for help on using the changeset viewer.