Make WordPress Core


Ignore:
Timestamp:
11/26/2017 03:16:55 AM (7 years ago)
Author:
dd32
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r42201 r42227  
    17711771 * @param string $key     Optional. The meta key to retrieve. By default, returns
    17721772 *                        data for all keys. Default empty.
    1773  * @param bool   $single  Optional. Whether to return a single value. Default false.
     1773 * @param bool   $single  Optional, default is false.
     1774 *                        If true, return only the first value of the specified meta_key.
     1775 *                        This parameter has no effect if meta_key is not specified.
    17741776 * @return mixed Will be an array if $single is false. Will be value of meta data
    17751777 *               field if $single is true.
Note: See TracChangeset for help on using the changeset viewer.