coenjacobs / smart-wysiwyg-blocks-of-content

WordPress plugin: Adds a custom post type that can be easily inserted at multiple spots, including widgets. Easy way to create WYSIWYG widgets.
https://wordpress.org/plugins/smart-wysiwyg-blocks-of-content/
1 stars 2 forks source link

Manual formatting of content output #3

Open coenjacobs opened 12 years ago

coenjacobs commented 12 years ago

Because there are lots of plugins out there adding filters to the_content and this plugin using that filter to output its content, there can be strange effects. That's why the formatting of the output to remains rich formatting needs to be applied manually: functions like wpautop.

coenjacobs commented 11 years ago

Some code I got emailed by Eddy Pareja that will help here:

/*****
This function mimics the_content wordpress filter without the extra filters added by plugins: 
****/
 function format_filtered($rawContent){
        $filteredContent = wptexturize( $rawContent );
        $filteredContent = convert_chars( $filteredContent );
        $filteredContent = wpautop( $filteredContent );
        $filteredContent = do_shortcode($filteredContent);
        return $filteredContent;
}