Changeset 47611 for trunk/src/wp-includes/comment.php
- Timestamp:
- 04/22/2020 10:29:34 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/comment.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r47610 r47611 448 448 * @link https://developer.wordpress.org/reference/functions/add_comment_meta/ 449 449 * 450 * @param int $comment_id Comment ID. 451 * @param string $meta_key Metadata name. 452 * @param mixed $meta_value Metadata value. 453 * @param bool $unique Optional. Whether the same key should not be added. Default false. 450 * @param int $comment_id Comment ID. 451 * @param string $meta_key Metadata name. 452 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 453 * @param bool $unique Optional. Whether the same key should not be added. 454 * Default false. 454 455 * @return int|bool Meta ID on success, false on failure. 455 456 */ … … 468 469 * @link https://developer.wordpress.org/reference/functions/delete_comment_meta/ 469 470 * 470 * @param int $comment_id comment ID 471 * @param string $meta_key Metadata name. 472 * @param mixed $meta_value Optional. Metadata value. 471 * @param int $comment_id Comment ID. 472 * @param string $meta_key Metadata name. 473 * @param mixed $meta_value Optional. Metadata value. If provided, 474 * rows will only be removed that match the value. 475 * Must be serializable if non-scalar. Default empty. 473 476 * @return bool True on success, false on failure. 474 477 */ … … 483 486 * @link https://developer.wordpress.org/reference/functions/get_comment_meta/ 484 487 * 485 * @param int $comment_id Comment ID. 486 * @param string $key Optional. The meta key to retrieve. By default, returns data for all keys. 487 * @param bool $single Optional. Whether to return a single value. Default false. 488 * @return mixed Will be an array if $single is false. Will be value of meta data field if $single 489 * is true. 488 * @param int $comment_id Comment ID. 489 * @param string $key Optional. The meta key to retrieve. By default, 490 * returns data for all keys. 491 * @param bool $single Optional. Whether to return a single value. 492 * This parameter has no effect if $key is not specified. 493 * Default false. 494 * @return mixed An array if $single is false. The value of meta data field 495 * if $single is true. 490 496 */ 491 497 function get_comment_meta( $comment_id, $key = '', $single = false ) { … … 504 510 * @link https://developer.wordpress.org/reference/functions/update_comment_meta/ 505 511 * 506 * @param int $comment_id Comment ID. 507 * @param string $meta_key Metadata key. 508 * @param mixed $meta_value Metadata value. 509 * @param mixed $prev_value Optional. Previous value to check before updating. Default empty. 510 * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure. 512 * @param int $comment_id Comment ID. 513 * @param string $meta_key Metadata key. 514 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 515 * @param mixed $prev_value Optional. Previous value to check before updating. 516 * Default empty. 517 * @return int|bool Meta ID if the key didn't exist, true on successful update, 518 * false on failure. 511 519 */ 512 520 function update_comment_meta( $comment_id, $meta_key, $meta_value, $prev_value = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.