Docs: Document the default value of $single and $prev_value parameters in various metadata functions.

Props denisco.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47610 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-04-22 09:38:12 +00:00
parent 7016ad5a78
commit b6391847b4
6 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -450,7 +450,7 @@ function get_comment_count( $post_id = 0 ) {
* @param int $comment_id Comment ID.
* @param string $meta_key Metadata name.
* @param mixed $meta_value Metadata value.
* @param bool $unique Optional, default is false. Whether the same key should not be added.
* @param bool $unique Optional. Whether the same key should not be added. Default false.
* @return int|bool Meta ID on success, false on failure.
*/
function add_comment_meta( $comment_id, $meta_key, $meta_value, $unique = false ) {
@@ -484,7 +484,7 @@ function delete_comment_meta( $comment_id, $meta_key, $meta_value = '' ) {
*
* @param int $comment_id Comment ID.
* @param string $key Optional. The meta key to retrieve. By default, returns data for all keys.
* @param bool $single Whether to return a single value.
* @param bool $single Optional. Whether to return a single value. Default false.
* @return mixed Will be an array if $single is false. Will be value of meta data field if $single
* is true.
*/
@@ -506,7 +506,7 @@ function get_comment_meta( $comment_id, $key = '', $single = false ) {
* @param int $comment_id Comment ID.
* @param string $meta_key Metadata key.
* @param mixed $meta_value Metadata value.
* @param mixed $prev_value Optional. Previous value to check before removing.
* @param mixed $prev_value Optional. Previous value to check before updating. Default empty.
* @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
*/
function update_comment_meta( $comment_id, $meta_key, $meta_value, $prev_value = '' ) {