bp_get_messages_subject_value

Get the default value for the Subject field.

Description

(string) bp_get_messages_subject_value(); 

Will get a value out of $_POST['subject'] if available (ie after a failed submission).

Returns (string)


Usage

  1. if ( !function_exists( 'bp_get_messages_subject_value' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-messages/bp-messages-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_get_messages_subject_value(); 
  7.  

Defined (1)

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

/bp-messages/bp-messages-template.php  
  1. function bp_get_messages_subject_value() { 
  2.  
  3. // Sanitized in bp-messages-filters.php. 
  4. $subject = ! empty( $_POST['subject'] ) 
  5. ? $_POST['subject'] 
  6. : ''; 
  7.  
  8. /** 
  9. * Filters the default value for the subject field. 
  10. * @since 1.0.0 
  11. * @param string $subject The default value for the subject field. 
  12. */