Forum Replies Created
-
In reply to: Feature requests
Thank you for all your help.
You may close this topic.In reply to: Feature requestsI think i ggot it:
Filters ‘bbp_get_topic_content’ and ‘bbp_get_reply_content’. They MUST run after wpautop, so i gave them priority 1000.All of my code to get my plugin compatible with bbpress looks now:
/* We use bbPress */ // editor bbpress in tinymce mode function wppa_enable_visual_editor_in_bbpress( $args = array() ) { if ( wppa_switch( 'photo_on_bbpress' ) ) { $args['tinymce'] = true; $args['teeny'] = false; } return $args; } add_filter( 'bbp_after_get_the_content_parse_args', 'wppa_enable_visual_editor_in_bbpress' ); // remove insert wp image button function wppa_remove_image_button_in_bbpress( $buttons ) { if ( wppa_switch( 'photo_on_bbpress' ) ) { if ( ( $key = array_search( 'image', $buttons ) ) !== false ) { unset( $buttons[$key] ); } } return $buttons ; } add_filter( 'bbp_get_teeny_mce_buttons', 'rew_remove_image_button_in_bbpress' ); // enable processing shortcodes function wppa_enable_shortcodes_in_bbpress( $content ) { if ( wppa_switch( 'photo_on_bbpress' ) ) { $content = do_shortcode( $content ); } return $content; } add_filter( 'bbp_get_topic_content', 'wppa_enable_shortcodes_in_bbpress', 1000 ); add_filter( 'bbp_get_reply_content', 'wppa_enable_shortcodes_in_bbpress', 1000 );
Pleas be so kind to review this to see if i did it right or did oversee something.
In reply to: Feature requestsWe see:
We want to see:
In reply to: Feature requestsYes, in the content of the topic/reply. It makes from
[photo 123]
the html to display photo with id=123 from plugin wp-photo-album-plus – instead of a photo from the wp media library – according to the settings in the settings page of that plugin; e.g link to lightbox, subtitle and possible social media buttons to share the image.The button that opens the dialog to select the photo, and optionally upload a new one, is now working without mods to bbpress, but it shows ‘[photo 123]’ instead of the picture. If the content would be filtered by the standard wp content filters, it would display the image, like it does in a wp native page or post.
In reply to: Feature requestsThank you, this works great!
One thing left: i can not find the filter to filter forum posts/replies, so i could do:
function my_process_shortcodes($content) { return do_shortcodes($content); } add_filter( '...??...', 'my_process_shortcodes' );