WordPress.org

Make WordPress Core

Ticket #40519: 40519.diff

File 40519.diff, 4.2 KB (added by salcode, 3 years ago)
  • src/wp-includes/comment.php

    diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
    index 7398f99dd9..98723cb3c0 100644
    a b function delete_comment_meta($comment_id, $meta_key, $meta_value = '') { 
    454454 * @param int $comment_id Comment ID.
    455455 * @param string $key Optional. The meta key to retrieve. By default, returns data for all keys.
    456456 * @param bool $single Whether to return a single value.
    457  * @return mixed Will be an array if $single is false. Will be value of meta data field if $single
    458  *  is true.
     457 * @return mixed Will be an array if $single is false. Will be value of meta data
     458 *               field if $single is true. Will return false for an invalid $comment_id.
    459459 */
    460460function get_comment_meta($comment_id, $key = '', $single = false) {
    461461        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 cfb9d95a9e..2eee44f75d 100644
    a b function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $d 
    456456 * @param bool   $single    Optional, default is false.
    457457 *                          If true, return only the first value of the specified meta_key.
    458458 *                          This parameter has no effect if meta_key is not specified.
    459  * @return mixed Single metadata value, or array of values
     459 * @return mixed Single metadata value, or array of values. False is returned for invalid parameters.
    460460 */
    461461function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) {
    462462        if ( ! $meta_type || ! is_numeric( $object_id ) ) {
  • src/wp-includes/post.php

    diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
    index a33236cc7f..2ee7ad5344 100644
    a b function delete_post_meta( $post_id, $meta_key, $meta_value = '' ) { 
    17491749 *                        data for all keys. Default empty.
    17501750 * @param bool   $single  Optional. Whether to return a single value. Default false.
    17511751 * @return mixed Will be an array if $single is false. Will be value of meta data
    1752  *               field if $single is true.
     1752 *               field if $single is true. Will return false for an invalid $post_id.
    17531753 */
    17541754function get_post_meta( $post_id, $key = '', $single = false ) {
    17551755        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 94f36689fd..8c43cce786 100644
    a b function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) { 
    11731173 * @param string $key     Optional. The meta key to retrieve. If no key is provided, fetches all metadata for the term.
    11741174 * @param bool   $single  Whether to return a single value. If false, an array of all values matching the
    11751175 *                        `$term_id`/`$key` pair will be returned. Default: false.
    1176  * @return mixed If `$single` is false, an array of metadata values. If `$single` is true, a single metadata value.
     1176 * @return mixed If `$single` is false, an array of metadata values. If `$single` is true,
     1177 *               a single metadata value. If $term_id is invalid, a bool value of false.
    11771178 */
    11781179function get_term_meta( $term_id, $key = '', $single = false ) {
    11791180        // Bail if term meta table is not installed.
  • src/wp-includes/user.php

    diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
    index dcd102623a..3805945f30 100644
    a b function delete_user_meta($user_id, $meta_key, $meta_value = '') { 
    794794 * @param int    $user_id User ID.
    795795 * @param string $key     Optional. The meta key to retrieve. By default, returns data for all keys.
    796796 * @param bool   $single  Whether to return a single value.
    797  * @return mixed Will be an array if $single is false. Will be value of meta data field if $single is true.
     797 * @return mixed Will be an array if $single is false. Will be value of meta data
     798 *               field if $single is true. Will return false for an invalid $user_id.
    798799 */
    799800function get_user_meta($user_id, $key = '', $single = false) {
    800801        return get_metadata('user', $user_id, $key, $single);