bpbbpst_referer_topic_subscribed

Activate the "Subscribe to replies" checkbox if the user asked for support using the new support widget.

Description

(string) bpbbpst_referer_topic_subscribed( $output, $checked ); 

Returns (string)

html output

Parameters (2)

0. $output
The output.
1. $checked
The checked.

Usage

  1. if ( !function_exists( 'bpbbpst_referer_topic_subscribed' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddy-bbpress-support-topic/includes/functions.php'; 
  3.  
  4. // The output. 
  5. $output = null; 
  6.  
  7. // The checked. 
  8. $checked = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bpbbpst_referer_topic_subscribed($output, $checked); 
  12.  

Defined (1)

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

/includes/functions.php  
  1. function bpbbpst_referer_topic_subscribed( $output = '', $checked ) { 
  2. if ( ! empty( $checked ) ) { 
  3. return $output; 
  4.  
  5. $forum_id = bbp_get_forum_id(); 
  6.  
  7. if ( empty( $forum_id ) ) { 
  8. return $output; 
  9.  
  10. $support_type = bpbbpst_get_forum_support_setting( $forum_id ); 
  11.  
  12. if ( ! empty( $support_type ) && $support_type != 3 && ! empty( $_REQUEST['bpbbpst-referer'] ) ) { 
  13. $checked = checked( true, true, false ); 
  14.  
  15. return apply_filters( 'bpbbpst_referer_filter_topic_subscribed', $checked, $forum_id, $support_type );