diff --git src/includes/core/actions.php src/includes/core/actions.php
index 734d00d..1dbf139 100644
|
|
add_action( 'bbp_spam_reply', 'bbp_decrease_user_reply_count' ); |
309 | 309 | add_action( 'bbp_insert_topic', 'bbp_insert_topic_update_counts', 10, 2 ); |
310 | 310 | add_action( 'bbp_insert_reply', 'bbp_insert_reply_update_counts', 10, 3 ); |
311 | 311 | |
| 312 | // Update topic voice counts. |
| 313 | add_action( 'bbp_new_reply', 'bbp_update_topic_voice_count' ); |
| 314 | add_action( 'bbp_trashed_reply', 'bbp_update_topic_voice_count' ); |
| 315 | add_action( 'bbp_untrashed_reply', 'bbp_update_topic_voice_count' ); |
| 316 | add_action( 'bbp_spammed_reply', 'bbp_update_topic_voice_count' ); |
| 317 | add_action( 'bbp_unspammed_reply', 'bbp_update_topic_voice_count' ); |
| 318 | add_action( 'bbp_approved_reply', 'bbp_update_topic_voice_count' ); |
| 319 | add_action( 'bbp_unapproved_reply', 'bbp_update_topic_voice_count' ); |
| 320 | |
| 321 | // Insert reply voice counts. |
| 322 | add_action( 'bbp_insert_reply', 'bbp_update_topic_voice_count' ); |
| 323 | |
312 | 324 | // Topic status transition helpers for replies |
313 | 325 | add_action( 'bbp_trash_topic', 'bbp_trash_topic_replies' ); |
314 | 326 | add_action( 'bbp_untrash_topic', 'bbp_untrash_topic_replies' ); |
diff --git src/includes/replies/functions.php src/includes/replies/functions.php
index 83bca7d..d35286e 100644
|
|
function bbp_update_reply_walker( $reply_id, $last_active_time = '', $forum_id = |
1022 | 1022 | // See https://bbpress.trac.wordpress.org/ticket/2838 |
1023 | 1023 | bbp_update_topic_last_active_time( $ancestor, $topic_last_active_time ); |
1024 | 1024 | |
1025 | | // Always update voice counts |
1026 | | bbp_update_topic_voice_count( $ancestor ); |
1027 | | |
1028 | 1025 | // Only update reply count if we're deleting a reply, or in the dashboard. |
1029 | 1026 | if ( in_array( current_filter(), array( 'bbp_deleted_reply', 'save_post' ), true ) ) { |
1030 | 1027 | bbp_update_topic_reply_count( $ancestor ); |
1031 | 1028 | bbp_update_topic_reply_count_hidden( $ancestor ); |
| 1029 | bbp_update_topic_voice_count( $ancestor ); |
1032 | 1030 | } |
1033 | 1031 | |
1034 | 1032 | // Forum meta relating to most recent topic |