bpbbpst_display_referer_to_moderators

Displays the referer above the support topic content.

Description

(string) bpbbpst_display_referer_to_moderators(); 

Returns (string)

html output


Usage

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

Defined (1)

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

/includes/functions.php  
  1. function bpbbpst_display_referer_to_moderators() { 
  2. $meta = get_post_meta( bbp_get_topic_id(), '_bpbbpst_support_referer', true ); 
  3.  
  4. if ( ! empty( $meta ) && current_user_can( 'moderate' ) && bbp_get_reply_id() == bbp_get_topic_id() ) { 
  5. echo '<pre>' . __( 'Referer', 'buddy-bbpress-support-topic' ) . ' :<br/>'. esc_url( $meta ).'</pre>';