Skip to:

Opened 14 years ago

Closed 14 years ago

#2287 closed defect (bug) (fixed)

Filter Request: bp_get_the_topic_post_edit_text

Reported by: nuprn1's profile nuprn1 Owned by:
Milestone: 1.2.4 Priority: normal
Severity: Version:
Component: Forums Keywords: has-patch


Possible to add a _edit_pre filter to bp_get_the_topic_post_edit_text?

Change History (3)

#1 @nuprn1
14 years ago

also noticed on the theme /groups/single/forum/edit.php that bp_the_topic_text() was not attribute_escape like the post in the textarea - so maybe something like this:

add_action( 'bp_get_the_topic_edit_text', 'attribute_escape' );
add_action( 'bp_get_the_post_edit_text', 'attribute_escape' );

function bp_the_topic_post_edit_text() {
	echo bp_get_the_topic_post_edit_text();
	function bp_get_the_topic_post_edit_text() {
		global $bp;

		$post = bp_forums_get_post( $bp->action_variables[4] );
		return apply_filters( 'bp_get_the_topic_post_edit_text', $post->post_text );

function bp_the_topic_edit_text() {
	echo bp_get_the_topic_edit_text();
	function bp_get_the_topic_edit_text() {
		global $forum_template;

		$post = bb_get_first_post( (int)$forum_template->topic->topic_id, false );
		return apply_filters( 'bp_get_the_topic_edit_text', $post->post_text );

#2 @DJPaul
14 years ago

  • Keywords has-patch added

Good catch. This is just adding a filter call so should get in.

#3 @johnjamesjacoby
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [2935]) Fixes #2287 props nuprn1

Note: See TracTickets for help on using tickets.