bbp_edit_reply_pre_content

  • apply_filters( 'bbp_edit_reply_pre_content', $reply_content, $reply_id )

    Source Reference:

    • Component: bbPress :: bbp-reply
      File: /bbp-includes/bbp-reply-functions.php :: Trac Source Line: 447
      	// Filter and sanitize
      	$reply_title = apply_filters( 'bbp_edit_reply_pre_title', $reply_title, $reply_id );
      
      	/** Reply Content *********************************************************/
      
      	if ( !empty( $_POST['bbp_reply_content'] ) )
      		$reply_content = $_POST['bbp_reply_content'];
      
      	// Filter and sanitize
      	$reply_content = apply_filters( 'bbp_edit_reply_pre_content', $reply_content, $reply_id );
      
      	// No reply content
      	if ( empty( $reply_content ) )
      		bbp_add_error( 'bbp_edit_reply_content', __( '<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress' ) );
      
      	/** Reply Blacklist *******************************************************/
      
      	if ( !bbp_check_for_blacklist( $anonymous_data, bbp_get_reply_author_id( $reply_id ), $reply_title, $reply_content ) )
      		bbp_add_error( 'bbp_reply_blacklist', __( '<strong>ERROR</strong>: Your reply cannot be edited at this time.', 'bbpress' ) );
      

Hook: add_filter: bbp_edit_reply_pre_content instances (4)

  • add_filter( 'bbp_edit_reply_pre_content', 'bp_activity_at_name_filter' )
    $tag: bbp_edit_reply_pre_content
    $function_to_add: bp_activity_at_name_filter
    $priority: 0
    $accepted_args: 0

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-extend-buddypress.php :: Trac Source Line: 180
      		// Only link mentions if activity component is active
      		if ( bp_is_active( 'activity' ) ) {
      
      			// Convert mentions into links on create
      			add_filter( 'bbp_new_topic_pre_content',  'bp_activity_at_name_filter' );
      			add_filter( 'bbp_new_reply_pre_content',  'bp_activity_at_name_filter' );
      
      			// Convert mentions into links on edit
      			add_filter( 'bbp_edit_topic_pre_content', 'bp_activity_at_name_filter' );
      			add_filter( 'bbp_edit_reply_pre_content', 'bp_activity_at_name_filter' );
      		}
      
      		// Revert links into text on edit
      		add_filter( 'bbp_get_form_topic_content', array( $this, 'strip_mentions_on_edit' ) );
      		add_filter( 'bbp_get_form_reply_content', array( $this, 'strip_mentions_on_edit' ) );
      	}
      
      	/**
      	 * Strip out BuddyPress activity at-name HTML on topic/reply edit
      	 *
      
  • add_filter( 'bbp_edit_reply_pre_content', 'balanceTags'     )
    $tag: bbp_edit_reply_pre_content
    $function_to_add: balanceTags
    $priority: 0
    $accepted_args: 0

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-core-hooks.php :: Trac Source Line: 297
      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' );
      add_filter( 'bbp_edit_reply_pre_content', 'wp_filter_kses'  );
      add_filter( 'bbp_edit_topic_pre_content', 'balanceTags'     );
      add_filter( 'bbp_edit_topic_pre_content', 'wp_rel_nofollow' );
      add_filter( 'bbp_edit_topic_pre_content', 'wp_filter_kses'  );
      
      // Add number format filter to functions requiring numeric output
      add_filter( 'bbp_get_forum_topic_count',       'bbp_number_format' );
      add_filter( 'bbp_get_forum_topic_reply_count', 'bbp_number_format' );
      
  • add_filter( 'bbp_edit_reply_pre_content', 'wp_rel_nofollow' )
    $tag: bbp_edit_reply_pre_content
    $function_to_add: wp_rel_nofollow
    $priority: 0
    $accepted_args: 0

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-core-hooks.php :: Trac Source Line: 298
      // 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' );
      add_filter( 'bbp_edit_reply_pre_content', 'wp_filter_kses'  );
      add_filter( 'bbp_edit_topic_pre_content', 'balanceTags'     );
      add_filter( 'bbp_edit_topic_pre_content', 'wp_rel_nofollow' );
      add_filter( 'bbp_edit_topic_pre_content', 'wp_filter_kses'  );
      
      // Add number format filter to functions requiring numeric output
      add_filter( 'bbp_get_forum_topic_count',       'bbp_number_format' );
      add_filter( 'bbp_get_forum_topic_reply_count', 'bbp_number_format' );
      
      // No follow and stripslashes on user profile links
      
  • add_filter( 'bbp_edit_reply_pre_content', 'wp_filter_kses'  )
    $tag: bbp_edit_reply_pre_content
    $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: 299
      // 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' );
      add_filter( 'bbp_edit_reply_pre_content', 'wp_filter_kses'  );
      add_filter( 'bbp_edit_topic_pre_content', 'balanceTags'     );
      add_filter( 'bbp_edit_topic_pre_content', 'wp_rel_nofollow' );
      add_filter( 'bbp_edit_topic_pre_content', 'wp_filter_kses'  );
      
      // Add number format filter to functions requiring numeric output
      add_filter( 'bbp_get_forum_topic_count',       'bbp_number_format' );
      add_filter( 'bbp_get_forum_topic_reply_count', 'bbp_number_format' );
      
      // No follow and stripslashes on user profile links
      add_filter( 'bbp_get_reply_author_link',      'wp_rel_nofollow' );
      

Comments are closed.