Make WordPress Core

Changeset 31132


Ignore:
Timestamp:
01/10/2015 09:37:23 PM (10 years ago)
Author:
wonderboymusic
Message:

get_post() takes $output as its 2nd param. The @return annotation should reflect the function's ability to return an array.

See #30799.

File:
1 edited

Legend:

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

    r31127 r31132  
    417417 * @param string      $filter Optional. Type of filter to apply. Accepts 'raw', 'edit', 'db',
    418418 *                            or 'display'. Default 'raw'.
    419  * @return WP_Post|null WP_Post on success or null on failure.
     419 * @return WP_Post|array|null Type corresponding to $output on success or null on failure.
     420 *                            When $output is OBJECT, a `WP_Post` instance is returned.
    420421 */
    421422function get_post( $post = null, $output = OBJECT, $filter = 'raw' ) {
Note: See TracChangeset for help on using the changeset viewer.