Docs: Document that various metadata functions return false for an invalid ID.
Props salcode. See #40519. git-svn-id: https://develop.svn.wordpress.org/trunk@48658 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
81c39e949f
commit
b7a5c75686
@ -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 );
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user