bp_docs_directory_filter_form_action

'action' URL for directory filter forms.

Description

(string) bp_docs_directory_filter_form_action(); 

Returns (string)


Usage

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

Defined (1)

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

/includes/templatetags.php  
  1. function bp_docs_directory_filter_form_action() { 
  2. $form_action = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 
  3. $keeper_keys = array( 'folder' ); 
  4. foreach ( $_GET as $k => $v ) { 
  5. if ( ! in_array( $k, $keeper_keys ) ) { 
  6. $form_action = remove_query_arg( $k, $form_action ); 
  7.  
  8. return $form_action;