Changeset 43982 for trunk/src/wp-includes/comment.php
- Timestamp:
- 12/12/2018 03:02:00 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43729
- Property svn:mergeinfo changed
-
trunk/src/wp-includes/comment.php
r43571 r43982 443 443 */ 444 444 function add_comment_meta( $comment_id, $meta_key, $meta_value, $unique = false ) { 445 $added = add_metadata( 'comment', $comment_id, $meta_key, $meta_value, $unique ); 446 if ( $added ) { 447 wp_cache_set( 'last_changed', microtime(), 'comment' ); 448 } 449 return $added; 445 return add_metadata( 'comment', $comment_id, $meta_key, $meta_value, $unique ); 450 446 } 451 447 … … 466 462 */ 467 463 function delete_comment_meta( $comment_id, $meta_key, $meta_value = '' ) { 468 $deleted = delete_metadata( 'comment', $comment_id, $meta_key, $meta_value ); 469 if ( $deleted ) { 470 wp_cache_set( 'last_changed', microtime(), 'comment' ); 471 } 472 return $deleted; 464 return delete_metadata( 'comment', $comment_id, $meta_key, $meta_value ); 473 465 } 474 466 … … 507 499 */ 508 500 function update_comment_meta( $comment_id, $meta_key, $meta_value, $prev_value = '' ) { 509 $updated = update_metadata( 'comment', $comment_id, $meta_key, $meta_value, $prev_value ); 510 if ( $updated ) { 511 wp_cache_set( 'last_changed', microtime(), 'comment' ); 512 } 513 return $updated; 501 return update_metadata( 'comment', $comment_id, $meta_key, $meta_value, $prev_value ); 514 502 } 515 503 … … 3513 3501 ); 3514 3502 } 3503 3504 /** 3505 * Sets the last changed time for the 'comment' cache group. 3506 * 3507 * @since 5.0.0 3508 */ 3509 function wp_cache_set_comments_last_changed() { 3510 wp_cache_set( 'last_changed', microtime(), 'comment' ); 3511 }
Note: See TracChangeset
for help on using the changeset viewer.