Make WordPress Core


Ignore:
Timestamp:
11/10/2021 03:30:31 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: List the expected return type first in a few functions:

  • get_previous_post()
  • get_next_post()
  • get_adjacent_post().

Follow-up to [46696], [47060], [49929], [49963], [51286].

See #53399.

File:
1 edited

Legend:

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

    r51967 r52111  
    17401740 * @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
    17411741 * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
    1742  * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
     1742 * @return WP_Post|null|string Post object if successful. Null if global $post is not set. Empty string if no
    17431743 *                             corresponding post exists.
    17441744 */
     
    17551755 * @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
    17561756 * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
    1757  * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
     1757 * @return WP_Post|null|string Post object if successful. Null if global $post is not set. Empty string if no
    17581758 *                             corresponding post exists.
    17591759 */
     
    17751775 * @param bool         $previous       Optional. Whether to retrieve previous post. Default true
    17761776 * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
    1777  * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
     1777 * @return WP_Post|null|string Post object if successful. Null if global $post is not set. Empty string if no
    17781778 *                             corresponding post exists.
    17791779 */
Note: See TracChangeset for help on using the changeset viewer.