Changeset 7797 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content-voting.php
- Timestamp:
- 10/27/2018 08:58:39 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content-voting.php
r7276 r7797 455 455 456 456 /** 457 * Resets the votes for a note.. 458 * 459 * The current user needs to have the edit_comment capability for the votes to be deleted. 460 * 461 * @access public 462 * 463 * @param int $comment_id The comment ID to reset votes for 464 */ 465 public static function reset_votes( $comment_id ) { 466 $comment_id = absint( $comment_id ); 467 if ( ! $comment_id || ! current_user_can( 'edit_comment', $comment_id ) ) { 468 return; 469 } 470 471 delete_comment_meta( $comment_id, self::$meta_upvotes ); 472 delete_comment_meta( $comment_id, self::$meta_downvotes ); 473 } 474 475 /** 457 476 * Handles abstraction between an up or down vote. 458 477 *
Note: See TracChangeset
for help on using the changeset viewer.