Hello!
I’m trying to use the following to filter the content of the attachment area. It filters the content of the reply, but does not affect the attachment area.
add_filter( 'bbp_get_reply_content', 'myprefix_use_audio_short_tag' );
function myprefix_use_audio_short_tag( $content ) {
$reg = "#<a>(.+)</a>#";
$content = preg_replace($reg, "<audio controls>Your browser does not support the audio tag.</audio><br>$2<br>", $content);
return $content;
}
If I change
add_filter( 'bbp_get_reply_content', 'myprefix_use_audio_short_tag' );
to have a priority of 1000, then it works. My question is, is there a better, more specific action I can filter so that the code works on the attachment area? Or is setting the priority to 1000 really the best option.
bbP version 2.6.6
- The topic ‘Filtering the content of the attachment area’ is closed to new replies.