Make WordPress Core

Changeset 51913


Ignore:
Timestamp:
10/16/2021 02:37:39 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for the tax_input parameter of wp_insert_post().

Follow-up to [10222], [13217], [33922].

Props dingo_d.
Fixes #54264.

File:
1 edited

Legend:

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

    r51912 r51913  
    38243824 *                                         Defaults to value of the 'default_category' option.
    38253825 *     @type array  $tags_input            Array of tag names, slugs, or IDs. Default empty.
    3826  *     @type array  $tax_input             Array of taxonomy terms keyed by their taxonomy name. Default empty.
     3826 *     @type array  $tax_input             An array of taxonomy terms keyed by their taxonomy name.
     3827 *                                         If the taxonomy is hierarchical, the term list needs to be
     3828 *                                         either an array of term IDs or a comma-separated string of IDs.
     3829 *                                         If the taxonomy is non-hierarchical, the term list can be an array
     3830 *                                         that contains term names or slugs, or a comma-separated string
     3831 *                                         of names or slugs. This is because, in hierarchical taxonomy,
     3832 *                                         child terms can have the same names with different parent terms,
     3833 *                                         so the only way to connect them is using ID. Default empty.
    38273834 *     @type array  $meta_input            Array of post meta values keyed by their post meta key. Default empty.
    38283835 * }
Note: See TracChangeset for help on using the changeset viewer.