Make WordPress Core

Changeset 36896


Ignore:
Timestamp:
03/09/2016 04:16:29 PM (8 years ago)
Author:
boonebgorges
Message:

Correct @return annotation for wp_set_object_terms() and related functions.

The return value is an array of term taxonomy IDs, not term IDs.

Fixes #36182.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r36727 r36896  
    38673867 * @param bool         $append  Optional. If true, don't delete existing tags, just add on. If false,
    38683868 *                              replace the tags with the new tags. Default false.
    3869  * @return array|false|WP_Error Array of affected term IDs. WP_Error or false on failure.
     3869 * @return array|false|WP_Error Array of term taxonomy IDs of affected terms. WP_Error or false on failure.
    38703870 */
    38713871function wp_set_post_tags( $post_id = 0, $tags = '', $append = false ) {
     
    38863886 * @param bool         $append   Optional. If true, don't delete existing terms, just add on. If false,
    38873887 *                               replace the terms with the new terms. Default false.
    3888  * @return array|false|WP_Error Array of affected term IDs. WP_Error or false on failure.
     3888 * @return array|false|WP_Error Array of term taxonomy IDs of affected terms. WP_Error or false on failure.
    38893889 */
    38903890function wp_set_post_terms( $post_id = 0, $tags = '', $taxonomy = 'post_tag', $append = false ) {
     
    39293929 * @param bool      $append         If true, don't delete existing categories, just add on.
    39303930 *                                  If false, replace the categories with the new categories.
    3931  * @return array|bool|WP_Error
     3931 * @return array|false|WP_Error Array of term taxonomy IDs of affected categories. WP_Error or false on failure.
    39323932 */
    39333933function wp_set_post_categories( $post_ID = 0, $post_categories = array(), $append = false ) {
  • trunk/src/wp-includes/taxonomy.php

    r36712 r36896  
    29742974 * @param string           $taxonomy  The context in which to relate the term to the object.
    29752975 * @param bool             $append    Optional. If false will delete difference of terms. Default false.
    2976  * @return array|WP_Error Affected Term IDs.
     2976 * @return array|WP_Error Term taxonomy IDs of the affected terms.
    29772977 */
    29782978function wp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) {
     
    30953095 * @param array|int|string $terms     The slug(s) or ID(s) of the term(s) to add.
    30963096 * @param array|string     $taxonomy  Taxonomy name.
    3097  * @return array|WP_Error Affected Term IDs
     3097 * @return array|WP_Error Term taxonomy IDs of the affected terms.
    30983098 */
    30993099function wp_add_object_terms( $object_id, $terms, $taxonomy ) {
Note: See TracChangeset for help on using the changeset viewer.