Opened 16 years ago
Closed 16 years ago
#2287 closed defect (bug) (fixed)
Filter Request: bp_get_the_topic_post_edit_text
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 1.2.4 | Priority: | normal |
| Severity: | Version: | ||
| Component: | Forums | Keywords: | has-patch |
| Cc: |
Description
Possible to add a _edit_pre filter to bp_get_the_topic_post_edit_text?
Change History (3)
Note: See
TracTickets for help on using
tickets.
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 ); }