Changeset 5950
- Timestamp:
- 09/21/2017 07:25:49 PM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php
r5734 r5950 513 513 bbp_increase_topic_reply_count_hidden( $topic_id ); 514 514 } 515 516 do_action( 'wporg_bbp_archived_reply', $post->ID ); 515 517 } else { 516 518 bbp_unstick_topic( $post->ID ); … … 530 532 } 531 533 } 534 535 do_action( 'wporg_bbp_archived_topic', $post->ID ); 532 536 } 533 537 … … 574 578 bbp_decrease_topic_reply_count_hidden( $topic_id ); 575 579 } 580 581 do_action( 'wporg_bbp_unarchived_reply', $post->ID ); 582 } else { 583 do_action( 'wporg_bbp_unarchived_topic', $post->ID ); 576 584 } 577 585 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-users.php
r5866 r5950 33 33 34 34 // Clear user's topics and reviews count cache. 35 add_action( 'bbp_new_topic', array( $this, 'clear_user_topics_count_cache' ), 10, 4 ); 35 add_action( 'bbp_new_topic', array( $this, 'clear_user_topics_count_cache' ) ); 36 add_action( 'bbp_spammed_topic', array( $this, 'clear_user_topics_count_cache' ) ); 37 add_action( 'bbp_unspammed_topic', array( $this, 'clear_user_topics_count_cache' ) ); 38 add_action( 'bbp_approved_topic', array( $this, 'clear_user_topics_count_cache' ) ); 39 add_action( 'bbp_unapproved_topic', array( $this, 'clear_user_topics_count_cache' ) ); 40 add_action( 'wporg_bbp_archived_topic', array( $this, 'clear_user_topics_count_cache' ) ); 41 add_action( 'wporg_bbp_unarchived_topic', array( $this, 'clear_user_topics_count_cache' ) ); 36 42 } 37 43 … … 348 354 * Clear user's topics and reviews count cache. 349 355 * 350 * @param int $topic_id Topic ID. 351 * @param int $forum_id Forum ID. 352 * @param array $anonymous_data Anonymous poster data. 353 * @param int $topic_author Topic author ID. 354 */ 355 public function clear_user_topics_count_cache( $topic_id, $forum_id, $anonymous_data, $topic_author ) { 356 if ( Plugin::REVIEWS_FORUM_ID != $forum_id ) { 357 wp_cache_delete( $topic_author, 'user-topics-count' ); 356 * @param int $topic_id Topic ID. 357 */ 358 public function clear_user_topics_count_cache( $topic_id ) { 359 $post = get_post( $topic_id ); 360 361 if ( Plugin::REVIEWS_FORUM_ID != $post->post_parent ) { 362 wp_cache_delete( $post->post_author, 'user-topics-count' ); 358 363 } else { 359 wp_cache_delete( $ topic_author, 'user-reviews-count' );364 wp_cache_delete( $post->post_author, 'user-reviews-count' ); 360 365 } 361 366 }
Note: See TracChangeset
for help on using the changeset viewer.