From a8cf928200d9ad62022e7a7737658c4806071196 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 10 Jan 2015 21:37:23 +0000 Subject: [PATCH] `get_post()` takes `$output` as its 2nd param. The `@return` annotation should reflect the function's ability to return an array. See #30799. git-svn-id: https://develop.svn.wordpress.org/trunk@31132 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 692f5d3f63..2257101033 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -416,7 +416,8 @@ function get_extended( $post ) { * Default OBJECT. * @param string $filter Optional. Type of filter to apply. Accepts 'raw', 'edit', 'db', * or 'display'. Default 'raw'. - * @return WP_Post|null WP_Post on success or null on failure. + * @return WP_Post|array|null Type corresponding to $output on success or null on failure. + * When $output is OBJECT, a `WP_Post` instance is returned. */ function get_post( $post = null, $output = OBJECT, $filter = 'raw' ) { if ( empty( $post ) && isset( $GLOBALS['post'] ) )