From d00e74042b7ff806e1cc45eb8d9235fa186f8b56 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sun, 26 Nov 2017 03:16:55 +0000 Subject: [PATCH] Docs: Update the documentation for `get_post_meta()` to clarify that `$single` has no effect when the `$meta_key` is not provided. Props chetan200891, titodevera. Fixes #42687. git-svn-id: https://develop.svn.wordpress.org/trunk@42227 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/post.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php index 1dbf0c9867..1dab926aea 100644 --- a/src/wp-includes/post.php +++ b/src/wp-includes/post.php @@ -1770,7 +1770,9 @@ function delete_post_meta( $post_id, $meta_key, $meta_value = '' ) { * @param int $post_id Post ID. * @param string $key Optional. The meta key to retrieve. By default, returns * data for all keys. Default empty. - * @param bool $single Optional. Whether to return a single value. Default false. + * @param bool $single Optional, default is false. + * If true, return only the first value of the specified meta_key. + * This parameter has no effect if meta_key is not specified. * @return mixed Will be an array if $single is false. Will be value of meta data * field if $single is true. */