Changeset 41848 for trunk/src/wp-includes/comment.php
- Timestamp:
- 10/12/2017 02:58:58 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r41704 r41848 424 424 */ 425 425 function add_comment_meta($comment_id, $meta_key, $meta_value, $unique = false) { 426 return add_metadata('comment', $comment_id, $meta_key, $meta_value, $unique); 426 $added = add_metadata( 'comment', $comment_id, $meta_key, $meta_value, $unique ); 427 if ( $added ) { 428 wp_cache_set( 'last_changed', microtime(), 'comment' ); 429 } 430 return $added; 427 431 } 428 432 … … 443 447 */ 444 448 function delete_comment_meta($comment_id, $meta_key, $meta_value = '') { 445 return delete_metadata('comment', $comment_id, $meta_key, $meta_value); 449 $deleted = delete_metadata( 'comment', $comment_id, $meta_key, $meta_value ); 450 if ( $deleted ) { 451 wp_cache_set( 'last_changed', microtime(), 'comment' ); 452 } 453 return $deleted; 446 454 } 447 455 … … 480 488 */ 481 489 function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = '') { 482 return update_metadata('comment', $comment_id, $meta_key, $meta_value, $prev_value); 490 $updated = update_metadata( 'comment', $comment_id, $meta_key, $meta_value, $prev_value ); 491 if ( $updated ) { 492 wp_cache_set( 'last_changed', microtime(), 'comment' ); 493 } 494 return $updated; 483 495 } 484 496
Note: See TracChangeset
for help on using the changeset viewer.