Make WordPress Core

Changeset 851 in tests


Ignore:
Timestamp:
07/02/2012 07:01:21 AM (13 years ago)
Author:
nacin
Message:

Add add_post_terms() term factory method. see #96.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-testlib/factory.php

    r848 r851  
    130130        $term_id_pair = wp_update_term( $term, $taxonomy, $fields );
    131131        return $term_id_pair['term_id'];
     132    }
     133
     134    function add_post_terms( $post_id, $terms, $taxonomy, $append = true ) {
     135        return wp_set_post_terms( $post_id, $terms, $taxonomy, $append );
    132136    }
    133137}
Note: See TracChangeset for help on using the changeset viewer.