bp_gifts_multiple_newgifts_notifications

The Buddypress Gifts Latest 2014 bp gifts multiple newgifts notifications hook.

Description

Parameters (2)

0. $a_href_bp_loggedin_user_domain_bp_gifts_slug_title____multiple_gifts_bp_gifts_sprintf____d_new_gifts_multi_gifts_bp_gifts_int_total_items_a — Optional. (string) => '' . sprintf( __( '%d new gifts, multi-gifts!', 'bp-gifts' ), (int)$total_items ) . ''
The a href bp loggedin user domain bp gifts slug title multiple gifts bp gifts sprintf d new gifts multi gifts bp gifts int total items a.
1. $total_items (number)
The total items.

Usage

To run the hook, copy the example below.
  1. $a_href_bp_loggedin_user_domain_bp_gifts_slug_title____multiple_gifts_bp_gifts_sprintf____d_new_gifts_multi_gifts_bp_gifts_int_total_items_a = apply_filters( 'bp_gifts_multiple_newgifts_notifications', $a_href_bp_loggedin_user_domain_bp_gifts_slug_title____multiple_gifts_bp_gifts_sprintf____d_new_gifts_multi_gifts_bp_gifts_int_total_items_a, $total_items ); 
  2.  
  3. if ( !empty( $a_href_bp_loggedin_user_domain_bp_gifts_slug_title____multiple_gifts_bp_gifts_sprintf____d_new_gifts_multi_gifts_bp_gifts_int_total_items_a ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_gifts_multiple_newgifts_notifications callback 
  2. function filter_bp_gifts_multiple_newgifts_notifications( $a_href_bp_loggedin_user_domain_bp_gifts_slug_title____multiple_gifts_bp_gifts_sprintf____d_new_gifts_multi_gifts_bp_gifts_int_total_items_a, $total_items ) { 
  3. // make filter magic happen here... 
  4. return $a_href_bp_loggedin_user_domain_bp_gifts_slug_title____multiple_gifts_bp_gifts_sprintf____d_new_gifts_multi_gifts_bp_gifts_int_total_items_a
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_gifts_multiple_newgifts_notifications', 'filter_bp_gifts_multiple_newgifts_notifications', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_gifts_multiple_newgifts_notifications', 'filter_bp_gifts_multiple_newgifts_notifications', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/bp-gifts-core.php  
  1. return apply_filters( 'bp_gifts_multiple_newgifts_notifications', '<a href="' . $bp->loggedin_user->domain . $bp->gifts->slug . '/" title="' . __( 'Multiple gifts', 'bp-gifts' ) . '">' . sprintf( __( '%d new gifts, multi-gifts!', 'bp-gifts' ), (int)$total_items ) . '</a>', $total_items );