No, that adds custom post type support by looping through the custom post types using the add_post_type_support() function. I already have that set.
I still haven’t been able to find where the & character conversion is taking place, but I have managed to get it to work.
Here’s the class I’m using
class JPM_BBP_Support {
/**
* Initialize the class and set its properties.
*/
public function __construct() {
add_action( 'plugins_loaded', array( $this, 'custom_jetpack_markdown_support' ) );
// Remove the back_code_trick filter
remove_filter( 'bbp_new_reply_pre_content', 'bbp_code_trick', 20 );
remove_filter( 'bbp_new_topic_pre_content', 'bbp_code_trick', 20 );
remove_filter( 'bbp_new_forum_pre_content', 'bbp_code_trick', 20 );
remove_filter( 'bbp_edit_reply_pre_content', 'bbp_code_trick', 20 );
remove_filter( 'bbp_edit_topic_pre_content', 'bbp_code_trick', 20 );
remove_filter( 'bbp_edit_forum_pre_content', 'bbp_code_trick', 20 );
add_filter( 'bbp_get_reply_content', array( $this, 'custom_con_char' ), 6 );
add_filter( 'bbp_get_topic_content', array( $this, 'custom_con_char' ), 6 );
}
/**
* Replace instances of < and >
* with < and > when pulling the content
* from the databse to display
*
* @param string $content the content stored in the database
* @return string the formated content
*/
public function custom_con_char( $content = '' ) {
$content = str_replace( '<', '<' , $content );
$content = str_replace( '>', '>' , $content );
return $content;
}
/**
* Add Markdown support for BBPress Froums
*/
public function custom_jetpack_markdown_support() {
add_post_type_support( 'topic', 'wpcom-markdown' );
add_post_type_support( 'reply', 'wpcom-markdown' );
}
}
$jmp_bbp_support = new JPM_BBP_Support();
@jawittdesigns
hopefully @netweb or @robin-w will pick this up since they browse the bbpress plugin files way more than i do.
Create a ticket on Trac and we’ll take a look at adding support for Jetpack Markdown
https://bbpress.trac.wordpress.org/
Howdy team!
Has there been any new work on getting Markdown working in bbPress?
@jawittdesigns’s plugin seems to have stopped working for me. So now I have these forums that have loads of Markdown content and say that they support Markdown, but don’t.
I’m not entirely sure what to do.