WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/18/2019 12:17:54 AM (2 years ago)
Author:
SergeyBiryukov
Message:

Docs: Various documentation fixes for unit test factories.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-term.php

    r46586 r46985  
    4747     * @param array|string $fields The context in which to relate the term to the object.
    4848     *
    49      * @return int The term id.
     49     * @return int The term ID.
    5050     */
    5151    public function update_object( $term, $fields ) {
     
    5959
    6060    /**
    61      * Attach terms on the given post.
     61     * Attach terms to the given post.
    6262     *
    63      * @param int          $post_id  The Post ID.
     63     * @param int          $post_id  The post ID.
    6464     * @param string|array $terms    An array of terms to set for the post, or a string of terms
    6565     *                               separated by commas. Hierarchical taxonomies must always pass IDs rather
     
    7777
    7878    /**
    79      * Create a term and returns it as a object.
     79     * Create a term and returns it as an object.
    8080     *
    8181     * @param array $args                   Array or string of arguments for inserting a term.
    8282     * @param null  $generation_definitions The default values.
    8383     *
    84      * @return null|WP_Error|WP_Term WP_Term on success. WP_error if taxonomy does not exist. Null for miscellaneous failure.
     84     * @return WP_Term|WP_Error|null WP_Term on success. WP_error if taxonomy does not exist. Null for miscellaneous failure.
    8585     */
    8686    public function create_and_get( $args = array(), $generation_definitions = null ) {
     
    9696
    9797    /**
    98      * Retrieves the term by given term id.
     98     * Retrieves the term by a given ID.
    9999     *
    100      * @param int $term_id The term id to retrieve.
     100     * @param int $term_id ID of the term to retrieve.
    101101     *
    102      * @return null|WP_Error|WP_Term WP_Term on success. WP_error if taxonomy does not exist. Null for miscellaneous failure.
     102     * @return WP_Term|WP_Error|null WP_Term on success. WP_error if taxonomy does not exist. Null for miscellaneous failure.
    103103     */
    104104    public function get_object_by_id( $term_id ) {
Note: See TracChangeset for help on using the changeset viewer.