bbp_edit_topic_pre_title

  • apply_filters( 'bbp_edit_topic_pre_title', $topic_title, $topic_id )

    Source Reference:

    • Component: bbPress :: bbp-topic
      File: /bbp-includes/bbp-topic-functions.php :: Trac Source Line: 506
      			bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
      	}
      
      	/** Topic Title ***********************************************************/
      
      	if ( !empty( $_POST['bbp_topic_title'] ) )
      		$topic_title = esc_attr( strip_tags( $_POST['bbp_topic_title'] ) );
      
      	// Filter and sanitize
      	$topic_title = apply_filters( 'bbp_edit_topic_pre_title', $topic_title, $topic_id );
      
      	// No topic title
      	if ( empty( $topic_title ) )
      		bbp_add_error( 'bbp_edit_topic_title', __( '<strong>ERROR</strong>: Your topic needs a title.', 'bbpress' ) );
      
      	/** Topic Content *********************************************************/
      
      	if ( !empty( $_POST['bbp_topic_content'] ) )
      		$topic_content = $_POST['bbp_topic_content'];
      

Hook: add_filter: bbp_edit_topic_pre_title instances (1)

  • add_filter( 'bbp_edit_topic_pre_title', 'wp_filter_kses' )
    $tag: bbp_edit_topic_pre_title
    $function_to_add: wp_filter_kses
    $priority: 0
    $accepted_args: 0

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-core-hooks.php :: Trac Source Line: 288
      add_filter( 'paginate_links',          'bbp_add_view_all' );
      add_filter( 'bbp_get_topic_permalink', 'bbp_add_view_all' );
      add_filter( 'bbp_get_reply_permalink', 'bbp_add_view_all' );
      add_filter( 'bbp_get_forum_permalink', 'bbp_add_view_all' );
      
      // wp_filter_kses on new/edit topic/reply title
      add_filter( 'bbp_new_reply_pre_title',  'wp_filter_kses' );
      add_filter( 'bbp_new_topic_pre_title',  'wp_filter_kses' );
      add_filter( 'bbp_edit_reply_pre_title', 'wp_filter_kses' );
      add_filter( 'bbp_edit_topic_pre_title', 'wp_filter_kses' );
      
      // balanceTags, wp_filter_kses and wp_rel_nofollow on new/edit topic/reply text
      add_filter( 'bbp_new_reply_pre_content',  'balanceTags'     );
      add_filter( 'bbp_new_reply_pre_content',  'wp_rel_nofollow' );
      add_filter( 'bbp_new_reply_pre_content',  'wp_filter_kses'  );
      add_filter( 'bbp_new_topic_pre_content',  'balanceTags'     );
      add_filter( 'bbp_new_topic_pre_content',  'wp_rel_nofollow' );
      add_filter( 'bbp_new_topic_pre_content',  'wp_filter_kses'  );
      add_filter( 'bbp_edit_reply_pre_content', 'balanceTags'     );
      add_filter( 'bbp_edit_reply_pre_content', 'wp_rel_nofollow' );
      

Comments are closed.