Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I get Wordpress to save comments in markdown format?
    primarykey
    data
    text
    <p>I love markdown, and I have the Wordpress <a href="http://wordpress.org/extend/plugins/markdown-for-wordpress-and-bbpress/" rel="nofollow noreferrer">markdown-for-wordpress-and-bbpress</a> parsing markdown in my posts and comments.</p> <p>However, I've noticed that Wordpress saves the comments rendered in html format. This makes it more difficult to go back and edit comments. How can I get wordpress to save comments in markdown format?</p> <p>I couldn't find a plugin for it. Maybe there's an easy php hack?</p> <h3>Edit:</h3> <p>Maybe it's not builtin to wordpress. Comments normally not saved with any markup without the markdown plugin. Could be a markdown-for-wordpress-and-bbpress "feature" / accident?</p> <p>Cross-posted to <a href="https://wordpress.stackexchange.com/questions/11937/how-can-i-get-wordpress-to-save-comments-in-markdown-format">wordpress.stackexchange.com</a>. BAinternet had some good ideas of saving markup for comments like in the markup-on-save plugin, but no working solution yet.</p> <h3>Partial hack</h3> <p><em>may help? May be theme-dependent. Lists still get saved rendered sometimes.</em></p> <p>In <code>wp-content/plugins/markdown-for-wordpress-and-bbpress/markdown.php</code> comment out the <code>pre_comment_content</code> markdown filter</p> <pre><code> if (MARKDOWN_WP_COMMENTS) { remove_filter('comment_text', 'wpautop', 30); remove_filter('comment_text', 'make_clickable'); #HACK don't save comments rendered in HTML #add_filter('pre_comment_content', 'Markdown', 6); add_filter('pre_comment_content', 'mdwp_hide_tags', 8); add_filter('pre_comment_content', 'mdwp_show_tags', 12); add_filter('get_comment_text', 'Markdown', 6); add_filter('get_comment_excerpt', 'Markdown', 6); add_filter('get_comment_excerpt', 'mdwp_strip_p', 7); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload