Make WordPress Core

Ticket #51797: 51797.2.diff

File 51797.2.diff, 6.1 KB (added by audrasjb, 4 years ago)
  • src/wp-includes/comment.php

    diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
    index 8c8ad0eeff..49a8977a1f 100644
    a b function delete_comment_meta( $comment_id, $meta_key, $meta_value = '' ) { 
    496496 *                           This parameter has no effect if $key is not specified.
    497497 *                           Default false.
    498498 * @return mixed An array if $single is false. The value of meta data field
    499  *               if $single is true. False for an invalid $comment_id.
     499 *               if $single is true. False for an invalid $comment_id (non-numeric,
     500 *               zero, or negative value). An empty string if a valid but non-existing
     501 *               post ID is passed.
    500502 */
    501503function get_comment_meta( $comment_id, $key = '', $single = false ) {
    502504        return get_metadata( 'comment', $comment_id, $key, $single );
  • src/wp-includes/meta.php

    diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php
    index 8bdb9d3ae5..12e0f13289 100644
    a b function delete_metadata( $meta_type, $object_id, $meta_key, $meta_value = '', $ 
    500500 * @param bool   $single    Optional. If true, return only the first value of the specified meta_key.
    501501 *                          This parameter has no effect if meta_key is not specified. Default false.
    502502 * @return mixed Single metadata value, or array of values.
    503  *               False if there's a problem with the parameters passed to the function.
     503 *               False if there's a problem with the parameters passed to the function (non-numeric, zero,
     504 *               or negative value).
     505 *               An empty string if a valid but non-existing post ID is passed.
    504506 */
    505507function get_metadata( $meta_type, $object_id, $meta_key = '', $single = false ) {
    506508        $value = get_metadata_raw( $meta_type, $object_id, $meta_key, $single );
    function get_metadata( $meta_type, $object_id, $meta_key = '', $single = false ) 
    524526 * @param bool   $single    Optional. If true, return only the first value of the specified meta_key.
    525527 *                          This parameter has no effect if meta_key is not specified. Default false.
    526528 * @return mixed Single metadata value, or array of values. Null if the value does not exist.
    527  *               False if there's a problem with the parameters passed to the function.
     529 *               False if there's a problem with the parameters passed to the function (non-numeric, zero,
     530 *               or negative value).
     531 *               An empty string if a valid but non-existing post ID is passed.
    528532 */
    529533function get_metadata_raw( $meta_type, $object_id, $meta_key = '', $single = false ) {
    530534        if ( ! $meta_type || ! is_numeric( $object_id ) ) {
  • src/wp-includes/ms-site.php

    diff --git a/src/wp-includes/ms-site.php b/src/wp-includes/ms-site.php
    index 61542c1755..4f603976c0 100644
    a b function delete_site_meta( $site_id, $meta_key, $meta_value = '' ) { 
    10871087 *                        This parameter has no effect if $key is not specified.
    10881088 *                        Default false.
    10891089 * @return mixed An array if $single is false. The value of meta data field
    1090  *               if $single is true. False for an invalid $site_id.
     1090 *               if $single is true. False for an invalid $site_id (non-numeric,
     1091 *               zero, or negative value). An empty string if a valid but non-existing
     1092 *               post ID is passed.
    10911093 */
    10921094function get_site_meta( $site_id, $key = '', $single = false ) {
    10931095        return get_metadata( 'blog', $site_id, $key, $single );
  • src/wp-includes/post.php

    diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
    index 526d8f7f36..e8abde02fd 100644
    a b function delete_post_meta( $post_id, $meta_key, $meta_value = '' ) { 
    22202220 *                        This parameter has no effect if $key is not specified.
    22212221 *                        Default false.
    22222222 * @return mixed An array if $single is false. The value of the meta field
    2223  *               if $single is true. False for an invalid $post_id.
     2223 *               if $single is true. False for an invalid $post_id (non-numeric,
     2224 *               zero, or negative value). An empty string if a valid but non-existing
     2225 *               post ID is passed.
    22242226 */
    22252227function get_post_meta( $post_id, $key = '', $single = false ) {
    22262228        return get_metadata( 'post', $post_id, $key, $single );
  • src/wp-includes/taxonomy.php

    diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
    index b250e0feef..505a37d40e 100644
    a b function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) { 
    13081308 *                        This parameter has no effect if $key is not specified.
    13091309 *                        Default false.
    13101310 * @return mixed An array if $single is false. The value of the meta field
    1311  *               if $single is true. False for an invalid $term_id.
     1311 *               if $single is true. False for an invalid $term_id (non-numeric,
     1312 *               zero, or negative value). An empty string if a valid but non-existing
     1313 *               post ID is passed.
    13121314 */
    13131315function get_term_meta( $term_id, $key = '', $single = false ) {
    13141316        return get_metadata( 'term', $term_id, $key, $single );
  • src/wp-includes/user.php

    diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
    index 5c6db55afb..e54d3361ac 100644
    a b function delete_user_meta( $user_id, $meta_key, $meta_value = '' ) { 
    10111011 *                        This parameter has no effect if $key is not specified.
    10121012 *                        Default false.
    10131013 * @return mixed An array if $single is false. The value of meta data field
    1014  *               if $single is true. False for an invalid $user_id.
     1014 *               if $single is true. False for an invalid $user_id (non-numeric,
     1015 *               zero, or negative value). An empty string if a valid but non-existing
     1016 *               post ID is passed.
    10151017 */
    10161018function get_user_meta( $user_id, $key = '', $single = false ) {
    10171019        return get_metadata( 'user', $user_id, $key, $single );