From 5f6d6a79e8f9cee88b52c0018475e92af1e1ac7c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 28 Jul 2020 10:15:04 +0000 Subject: [PATCH] Docs: Document that various metadata functions return false for an invalid ID. Props salcode. See #40519. Built from https://develop.svn.wordpress.org/trunk@48658 git-svn-id: http://core.svn.wordpress.org/trunk@48420 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 2 +- wp-includes/ms-site.php | 2 +- wp-includes/post.php | 2 +- wp-includes/taxonomy.php | 2 +- wp-includes/user.php | 2 +- wp-includes/version.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 93ff1876dc..efcf384815 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -496,7 +496,7 @@ function delete_comment_meta( $comment_id, $meta_key, $meta_value = '' ) { * This parameter has no effect if $key is not specified. * Default false. * @return mixed An array if $single is false. The value of meta data field - * if $single is true. + * if $single is true. False for an invalid $comment_id. */ function get_comment_meta( $comment_id, $key = '', $single = false ) { return get_metadata( 'comment', $comment_id, $key, $single ); diff --git a/wp-includes/ms-site.php b/wp-includes/ms-site.php index 7070baefd9..b90dde3cd0 100644 --- a/wp-includes/ms-site.php +++ b/wp-includes/ms-site.php @@ -1087,7 +1087,7 @@ function delete_site_meta( $site_id, $meta_key, $meta_value = '' ) { * This parameter has no effect if $key is not specified. * Default false. * @return mixed An array if $single is false. The value of meta data field - * if $single is true. + * if $single is true. False for an invalid $site_id. */ function get_site_meta( $site_id, $key = '', $single = false ) { return get_metadata( 'blog', $site_id, $key, $single ); diff --git a/wp-includes/post.php b/wp-includes/post.php index 9a1aaeeb64..d92d9617f2 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2120,7 +2120,7 @@ function delete_post_meta( $post_id, $meta_key, $meta_value = '' ) { * This parameter has no effect if $key is not specified. * Default false. * @return mixed An array if $single is false. The value of the meta field - * if $single is true. + * if $single is true. False for an invalid $post_id. */ function get_post_meta( $post_id, $key = '', $single = false ) { return get_metadata( 'post', $post_id, $key, $single ); diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index e07e783528..69355a3fb0 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1292,7 +1292,7 @@ function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) { * This parameter has no effect if $key is not specified. * Default false. * @return mixed An array if $single is false. The value of the meta field - * if $single is true. + * if $single is true. False for an invalid $term_id. */ function get_term_meta( $term_id, $key = '', $single = false ) { return get_metadata( 'term', $term_id, $key, $single ); diff --git a/wp-includes/user.php b/wp-includes/user.php index 28f1583a90..4994563d08 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -831,7 +831,7 @@ function delete_user_meta( $user_id, $meta_key, $meta_value = '' ) { * This parameter has no effect if $key is not specified. * Default false. * @return mixed An array if $single is false. The value of meta data field - * if $single is true. + * if $single is true. False for an invalid $user_id. */ function get_user_meta( $user_id, $key = '', $single = false ) { return get_metadata( 'user', $user_id, $key, $single ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 04e6bb325c..fb55dd44f1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-beta4-48657'; +$wp_version = '5.5-beta4-48658'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.