bp_core_render_message_content

Filters the 'template_notices' feedback message content.

Description

apply_filters( 'bp_core_render_message_content', (string) $bp_template_message, (string) $type ); 

Parameters (2)

0. $bp_template_message (string)
Feedback message content.
1. $type (string)
The type of message being displayed. Either updated or error..

Usage

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

Defined (1)

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

/bp-core/bp-core-functions.php  
  1. $content = apply_filters( 'bp_core_render_message_content', $bp->template_message, $type ); ?>