bpbbpst_referer_extra_field

Outputs an hidden field with the referer url.

Description

(string) bpbbpst_referer_extra_field( (int) $support_type = 0 ); 

Returns (string)

html output

Parameters (1)

0. $support_type — Optional. (int)
The forum support setting

Usage

  1. if ( !function_exists( 'bpbbpst_referer_extra_field' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddy-bbpress-support-topic/includes/functions.php'; 
  3.  
  4. // the forum support setting 
  5. $support_type = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bpbbpst_referer_extra_field($support_type); 
  9.  

Defined (1)

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

/includes/functions.php  
  1. function bpbbpst_referer_extra_field( $support_type = 0 ) { 
  2. if ( ! empty( $support_type ) && $support_type != 3 && ! empty( $_REQUEST['bpbbpst-referer'] ) ) { 
  3. $referer = esc_url_raw( wp_get_referer() ); 
  4. ?> 
  5. <input type="hidden" name="_bp_bbp_st_referer" value="<?php echo $referer;?>"/> 
  6. <?php