Changeset 6923 for trunk/src/includes/core/actions.php
- Timestamp:
- 11/09/2019 05:35:42 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/core/actions.php
r6915 r6923 231 231 232 232 // Subscriptions 233 add_action( 'bbp_spam_topic', 'bbp_remove_topic_from_all_subscriptions' ); 234 add_action( 'bbp_trash_topic', 'bbp_remove_topic_from_all_subscriptions' ); 235 add_action( 'bbp_delete_topic', 'bbp_remove_topic_from_all_subscriptions' ); 236 add_action( 'bbp_trash_forum', 'bbp_remove_forum_from_all_subscriptions' ); 237 add_action( 'bbp_delete_forum', 'bbp_remove_forum_from_all_subscriptions' ); 238 add_action( 'bbp_new_reply', 'bbp_notify_topic_subscribers', 11, 5 ); 239 add_action( 'bbp_new_topic', 'bbp_notify_forum_subscribers', 11, 4 ); 233 add_action( 'bbp_spam_topic', 'bbp_remove_topic_from_all_subscriptions' ); 234 add_action( 'bbp_trash_topic', 'bbp_remove_topic_from_all_subscriptions' ); 235 add_action( 'bbp_delete_topic', 'bbp_remove_topic_from_all_subscriptions' ); 236 add_action( 'bbp_trash_forum', 'bbp_remove_forum_from_all_subscriptions' ); 237 add_action( 'bbp_delete_forum', 'bbp_remove_forum_from_all_subscriptions' ); 238 239 // Subscription notifications 240 add_action( 'bbp_new_reply', 'bbp_notify_topic_subscribers', 11, 5 ); 241 add_action( 'bbp_new_topic', 'bbp_notify_forum_subscribers', 11, 4 ); 240 242 241 243 // Sticky … … 264 266 add_action( 'bbp_unapproved_reply', 'bbp_update_reply_walker' ); 265 267 266 // Update forum topic/reply counts. 267 add_action( 'bbp_new_reply', 'bbp_increase_forum_reply_count' ); 268 add_action( 'bbp_new_topic', 'bbp_increase_forum_topic_count' ); 269 add_action( 'bbp_trashed_reply', 'bbp_decrease_forum_reply_count' ); 270 add_action( 'bbp_trashed_topic', 'bbp_decrease_forum_topic_count' ); 271 add_action( 'bbp_untrashed_reply', 'bbp_increase_forum_reply_count' ); 272 add_action( 'bbp_untrashed_topic', 'bbp_increase_forum_topic_count' ); 273 add_action( 'bbp_spammed_reply', 'bbp_decrease_forum_reply_count' ); 274 add_action( 'bbp_spammed_topic', 'bbp_decrease_forum_topic_count' ); 275 add_action( 'bbp_unspammed_reply', 'bbp_increase_forum_reply_count' ); 276 add_action( 'bbp_unspammed_topic', 'bbp_increase_forum_topic_count' ); 277 add_action( 'bbp_approved_reply', 'bbp_increase_forum_reply_count' ); 278 add_action( 'bbp_approved_topic', 'bbp_increase_forum_topic_count' ); 279 add_action( 'bbp_unapproved_reply', 'bbp_decrease_forum_reply_count' ); 280 add_action( 'bbp_unapproved_topic', 'bbp_decrease_forum_topic_count' ); 268 // Update forum reply counts 269 add_action( 'bbp_new_reply', 'bbp_increase_forum_reply_count' ); 270 add_action( 'bbp_untrashed_reply', 'bbp_increase_forum_reply_count' ); 271 add_action( 'bbp_unspammed_reply', 'bbp_increase_forum_reply_count' ); 272 add_action( 'bbp_approved_reply', 'bbp_increase_forum_reply_count' ); 273 add_action( 'bbp_trash_reply', 'bbp_decrease_forum_reply_count' ); 274 add_action( 'bbp_spam_reply', 'bbp_decrease_forum_reply_count' ); 275 add_action( 'bbp_unapprove_reply', 'bbp_decrease_forum_reply_count' ); 276 277 // Update forum hidden reply counts 278 add_action( 'bbp_trashed_reply', 'bbp_increase_forum_reply_count_hidden' ); 279 add_action( 'bbp_spammed_reply', 'bbp_increase_forum_reply_count_hidden' ); 280 add_action( 'bbp_unapproved_reply', 'bbp_increase_forum_reply_count_hidden' ); 281 add_action( 'bbp_untrash_reply', 'bbp_decrease_forum_reply_count_hidden' ); 282 add_action( 'bbp_unspam_reply', 'bbp_decrease_forum_reply_count_hidden' ); 283 add_action( 'bbp_approve_reply', 'bbp_decrease_forum_reply_count_hidden' ); 284 add_action( 'bbp_delete_reply', 'bbp_decrease_forum_reply_count_hidden' ); 285 286 // Update forum topic counts 287 add_action( 'bbp_new_topic', 'bbp_increase_forum_topic_count' ); 288 add_action( 'bbp_untrashed_topic', 'bbp_increase_forum_topic_count' ); 289 add_action( 'bbp_unspammed_topic', 'bbp_increase_forum_topic_count' ); 290 add_action( 'bbp_approved_topic', 'bbp_increase_forum_topic_count' ); 291 add_action( 'bbp_trash_topic', 'bbp_decrease_forum_topic_count' ); 292 add_action( 'bbp_spam_topic', 'bbp_decrease_forum_topic_count' ); 293 add_action( 'bbp_unapprove_topic', 'bbp_decrease_forum_topic_count' ); 294 295 // Update forum hidden topic counts 281 296 add_action( 'bbp_trashed_topic', 'bbp_increase_forum_topic_count_hidden' ); 282 add_action( 'bbp_untrashed_topic', 'bbp_decrease_forum_topic_count_hidden' );283 297 add_action( 'bbp_spammed_topic', 'bbp_increase_forum_topic_count_hidden' ); 284 add_action( 'bbp_unspammed_topic', 'bbp_decrease_forum_topic_count_hidden' );285 add_action( 'bbp_approved_topic', 'bbp_decrease_forum_topic_count_hidden' );286 298 add_action( 'bbp_unapproved_topic', 'bbp_increase_forum_topic_count_hidden' ); 287 288 // Update forum reply counts for approved/unapproved topics. 299 add_action( 'bbp_untrash_topic', 'bbp_decrease_forum_topic_count_hidden' ); 300 add_action( 'bbp_unspam_topic', 'bbp_decrease_forum_topic_count_hidden' ); 301 add_action( 'bbp_approve_topic', 'bbp_decrease_forum_topic_count_hidden' ); 302 add_action( 'bbp_delete_topic', 'bbp_decrease_forum_topic_count_hidden' ); 303 304 // Update topic reply counts 305 add_action( 'bbp_new_reply', 'bbp_increase_topic_reply_count' ); 306 add_action( 'bbp_untrashed_reply', 'bbp_increase_topic_reply_count' ); 307 add_action( 'bbp_unspammed_reply', 'bbp_increase_topic_reply_count' ); 308 add_action( 'bbp_approved_reply', 'bbp_increase_topic_reply_count' ); 309 add_action( 'bbp_trash_reply', 'bbp_decrease_topic_reply_count' ); 310 add_action( 'bbp_spam_reply', 'bbp_decrease_topic_reply_count' ); 311 add_action( 'bbp_unapprove_reply', 'bbp_decrease_topic_reply_count' ); 312 313 // Update topic hidden reply counts 314 add_action( 'bbp_trashed_reply', 'bbp_increase_topic_reply_count_hidden' ); 315 add_action( 'bbp_unapproved_reply', 'bbp_increase_topic_reply_count_hidden' ); 316 add_action( 'bbp_spammed_reply', 'bbp_increase_topic_reply_count_hidden' ); 317 add_action( 'bbp_untrash_reply', 'bbp_decrease_topic_reply_count_hidden' ); 318 add_action( 'bbp_unspam_reply', 'bbp_decrease_topic_reply_count_hidden' ); 319 add_action( 'bbp_approve_reply', 'bbp_decrease_topic_reply_count_hidden' ); 320 add_action( 'bbp_delete_reply', 'bbp_decrease_topic_reply_count_hidden' ); 321 322 // Update forum reply counts for approved/unapproved topics 289 323 add_action( 'bbp_approved_topic', 'bbp_approved_unapproved_topic_update_forum_reply_count' ); 290 324 add_action( 'bbp_unapproved_topic', 'bbp_approved_unapproved_topic_update_forum_reply_count' ); 291 325 292 // Update topic reply counts. 293 add_action( 'bbp_new_reply', 'bbp_increase_topic_reply_count' ); 294 add_action( 'bbp_trashed_reply', 'bbp_decrease_topic_reply_count' ); 295 add_action( 'bbp_untrashed_reply', 'bbp_increase_topic_reply_count' ); 296 add_action( 'bbp_spammed_reply', 'bbp_decrease_topic_reply_count' ); 297 add_action( 'bbp_unspammed_reply', 'bbp_increase_topic_reply_count' ); 298 add_action( 'bbp_approved_reply', 'bbp_increase_topic_reply_count' ); 299 add_action( 'bbp_unapproved_reply', 'bbp_decrease_topic_reply_count' ); 300 add_action( 'bbp_trashed_reply', 'bbp_increase_topic_reply_count_hidden' ); 301 add_action( 'bbp_untrashed_reply', 'bbp_decrease_topic_reply_count_hidden' ); 302 add_action( 'bbp_spammed_reply', 'bbp_increase_topic_reply_count_hidden' ); 303 add_action( 'bbp_unspammed_reply', 'bbp_decrease_topic_reply_count_hidden' ); 304 add_action( 'bbp_approved_reply', 'bbp_decrease_topic_reply_count_hidden' ); 305 add_action( 'bbp_unapproved_reply', 'bbp_increase_topic_reply_count_hidden' ); 306 add_action( 'bbp_deleted_reply', 'bbp_decrease_topic_reply_count_hidden' ); 307 308 // Users topic & reply counts. 326 // Users topic & reply counts 309 327 add_action( 'bbp_new_topic', 'bbp_increase_user_topic_count' ); 310 328 add_action( 'bbp_new_reply', 'bbp_increase_user_reply_count' ); … … 325 343 add_action( 'bbp_unspam_topic', 'bbp_unspam_topic_replies' ); 326 344 327 // Topic engagements on user creation .345 // Topic engagements on user creation 328 346 add_action( 'bbp_new_topic', 'bbp_update_topic_engagements', 20 ); 329 347 add_action( 'bbp_new_reply', 'bbp_update_topic_engagements', 20 ); … … 344 362 add_action( 'bbp_insert_reply', 'bbp_update_topic_voice_count', 30 ); 345 363 346 // Recalculate engagements .364 // Recalculate engagements 347 365 add_action( 'bbp_trashed_reply', 'bbp_recalculate_topic_engagements' ); 348 366 add_action( 'bbp_untrashed_reply', 'bbp_recalculate_topic_engagements' ); … … 360 378 add_action( 'bbp_deleted_topic', 'bbp_recalculate_topic_engagements' ); 361 379 362 // Update engagement counts .380 // Update engagement counts 363 381 add_action( 'bbp_trashed_reply', 'bbp_update_topic_voice_count', 30 ); 364 382 add_action( 'bbp_untrashed_reply', 'bbp_update_topic_voice_count', 30 );
Note: See TracChangeset
for help on using the changeset viewer.