Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/23/2016 02:48:33 AM (6 years ago)
Author:
johnjamesjacoby
Message:

Extend: Consolidate some BuddyPress hooks to the top of each file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/extend/buddypress/notifications.php

    r6141 r6180  
    11<?php
     2
     3/**
     4 * bbPress BuddyPress Notifications
     5 *
     6 * @package bbPress
     7 * @subpackage BuddyPress
     8 */
     9
     10// Exit if accessed directly
     11defined( 'ABSPATH' ) || exit;
     12
     13// Hooks
     14add_filter( 'bp_notifications_get_registered_components', 'bbp_filter_notifications_get_registered_components', 10 );
     15add_filter( 'bp_notifications_get_notifications_for_user', 'bbp_format_buddypress_notifications', 10, 5 );
     16add_action( 'bbp_new_reply', 'bbp_buddypress_add_notification', 10, 7 );
     17add_action( 'bbp_get_request', 'bbp_buddypress_mark_notifications', 1 );
     18
     19/** BuddyPress Helpers ********************************************************/
    220
    321/**
     
    2442    return $component_names;
    2543}
    26 add_filter( 'bp_notifications_get_registered_components', 'bbp_filter_notifications_get_registered_components', 10 );
    2744
    2845/**
     
    8097    return $return;
    8198}
    82 add_filter( 'bp_notifications_get_notifications_for_user', 'bbp_format_buddypress_notifications', 10, 5 );
    8399
    84100/**
     
    127143        bp_notifications_add_notification( $args );
    128144    }
    129  
     145
    130146    // Notify the immediate reply author if not the current reply author
    131147    if ( ! empty( $reply_to ) && ( $author_id !== $reply_to_item_id ) ) {
     
    135151    }
    136152}
    137 add_action( 'bbp_new_reply', 'bbp_buddypress_add_notification', 10, 7 );
    138153
    139154/**
     
    185200    bbp_redirect( $redirect );
    186201}
    187 add_action( 'bbp_get_request', 'bbp_buddypress_mark_notifications', 1 );
Note: See TracChangeset for help on using the changeset viewer.