Skip to:
Content
Pages
Categories
Search
Top
Bottom

Integrating PHP Markdown to Topics and Replies?


  • alexchenco
    Member

    @alexchenco

    I recently started using this WordPress PHP implementation of the Markdown http://michelf.com/projects/php-markdown/

    Right now it only supports Posts and Comments. Topics and Replies don’t get aprsed.

    This comes from markdown.php:

    # Post content and excerpts
    # - Remove WordPress paragraph generator.
    # - Run Markdown on excerpt, then remove all tags.
    # - Add paragraph tag around the excerpt, but remove it for the excerpt rss.
    if (MARKDOWN_WP_POSTS) {
    remove_filter('the_content', 'wpautop');
    remove_filter('the_content_rss', 'wpautop');
    remove_filter('the_excerpt', 'wpautop');
    add_filter('the_content', 'Markdown', 6);
    add_filter('the_content_rss', 'Markdown', 6);
    add_filter('get_the_excerpt', 'Markdown', 6);
    add_filter('get_the_excerpt', 'trim', 7);
    add_filter('the_excerpt', 'mdwp_add_p');
    add_filter('the_excerpt_rss', 'mdwp_strip_p');

    remove_filter('content_save_pre', 'balanceTags', 50);
    remove_filter('excerpt_save_pre', 'balanceTags', 50);
    add_filter('the_content', 'balanceTags', 50);
    add_filter('get_the_excerpt', 'balanceTags', 9);
    }

    How to modify the line above to be effective for Topics and Replies?

You must be logged in to reply to this topic.