messages_notice_subject_before_save

The BuddyPress messages notice subject before save hook.

Description

apply_filters( 'messages_notice_subject_before_save', (unknown) $this_subject, (unknown) $this_id ); 

Parameters (2)

0. $this_subject (unknown)
The this subject.
1. $this_id (unknown)
The this id.

Usage

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

Defined (1)

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

/bp-messages/classes/class-bp-messages-notice.php  
  1. $this->subject = apply_filters( 'messages_notice_subject_before_save', $this->subject, $this->id );