bp_blog_hidden_fields

Output hidden fields to help with form submissions in Sites directory.

Description

bp_blog_hidden_fields(); 

This function detects whether s,, letter , or blogs_search requests are currently being made (as in a URL parameter), and creates corresponding hidden fields.


Usage

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

Defined (1)

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

/bp-blogs/bp-blogs-template.php  
  1. function bp_blog_hidden_fields() { 
  2. if ( isset( $_REQUEST['s'] ) ) 
  3. echo '<input type="hidden" id="search_terms" value="' . esc_attr( $_REQUEST['s'] ). '" name="search_terms" />'; 
  4.  
  5. if ( isset( $_REQUEST['letter'] ) ) 
  6. echo '<input type="hidden" id="selected_letter" value="' . esc_attr( $_REQUEST['letter'] ) . '" name="selected_letter" />'; 
  7.  
  8. if ( isset( $_REQUEST['blogs_search'] ) ) 
  9. echo '<input type="hidden" id="search_terms" value="' . esc_attr( $_REQUEST['blogs_search'] ) . '" name="search_terms" />';