From 611c090b4168ea0f55357d8422d8857b0f4777c2 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sun, 26 Nov 2017 03:17:54 +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. Built from https://develop.svn.wordpress.org/trunk@42227 git-svn-id: http://core.svn.wordpress.org/trunk@42056 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 1dbf0c9867..1dab926aea 100644 --- a/wp-includes/post.php +++ b/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. */ diff --git a/wp-includes/version.php b/wp-includes/version.php index 2b6d02492f..26645e5e86 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42226'; +$wp_version = '5.0-alpha-42227'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.