bp_member_hidden_fields

Output hidden input for preserving member search params on form submit.

Description

bp_member_hidden_fields(); 

Usage

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

Defined (1)

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

/bp-members/bp-members-template.php  
  1. function bp_member_hidden_fields() { 
  2. $query_arg = bp_core_get_component_search_query_arg( 'members' ); 
  3.  
  4. if ( isset( $_REQUEST[ $query_arg ] ) ) { 
  5. echo '<input type="hidden" id="search_terms" value="' . esc_attr( $_REQUEST[ $query_arg ] ) . '" name="search_terms" />'; 
  6.  
  7. if ( isset( $_REQUEST['letter'] ) ) { 
  8. echo '<input type="hidden" id="selected_letter" value="' . esc_attr( $_REQUEST['letter'] ) . '" name="selected_letter" />'; 
  9.  
  10. if ( isset( $_REQUEST['members_search'] ) ) { 
  11. echo '<input type="hidden" id="search_terms" value="' . esc_attr( $_REQUEST['members_search'] ) . '" name="search_terms" />';