WordPress.org

Ready to get started?Download WordPress

Forums

Allow HTML in Category Descriptions does not work in WP 2.9 (9 posts)

  1. Bart van Poll
    Member
    Posted 4 years ago #

    Can anybody tell me why the "Allow HTML in Category Descriptions" plugin does not work in WP 2.9?

    Is there an alternative, so I can use html in category description? I can't find it!

    Thanks a lot!

    http://wordpress.org/extend/plugins/allow-html-in-category-descriptions/

  2. teonsight
    Member
    Posted 4 years ago #

    I've got the same problem, in particular the unordered and ordered list are not rendered, while "strong" tags are.

    Hope the Plugin author has some time to fix it...
    Thanks

  3. damiano.morosi
    Member
    Posted 4 years ago #

    Same problem here...

    I have also tried to manually add the remove_filter options in my theme functions.php but without any success.

  4. Kevin
    Member
    Posted 4 years ago #

    Broken for me too - still looking for a solution.

  5. Arno Esterhuizen
    Member
    Posted 4 years ago #

    I've had a look, and it seems like my plugin still works -- it prevents the code from being stripped on save.

    Unfortunately when category_description() gets called, it is filtered again.

    Does anybody know why or what filters to disable to keep it from being filtered on output?

    Cheers
    Arno Esterhuizen

  6. Arno Esterhuizen
    Member
    Posted 4 years ago #

    OK, I've fixed the plugin to work in WP 2.9+, but I'm unable to commit the updates to SVN

    Update readme.txt to the following:

    === Allow HTML in Category Descriptions ===
    Contributors: arno_esterhuizen
    Donate link: Sorry, none available at the moment. If you feel strongly about it, email me and we can work something out
    Tags: categories, category descriptions, html, filter
    Requires at least: 2.5
    Tested up to: 2.9.1
    Stable tag: trunk
    
    This plugin allows you to use unfiltered HTML in your category descriptions by disabling WP filters
    
    == Description ==
    
    When you add text to the category description textarea and save the category, WordPress runs content filters that
    strips out all but the most basic formatting tags.
    
    This plugin disables those filters. Any html code you add to the category description will not be stripped out.
    
    This plugin does not do anything other than disable the filters. It does not protect you from entering invalid HTML,
    nor does it help you create WYSIWYG HTML. You can use the post or page composing screen to help you create the text
    and formatting. Then switch to the 'code' tab and copy the HTML code into the category description field.
    
    == Installation ==
    
    1. Upload <code>html-in-category-descriptions.php</code> to the <code>/wp-content/plugins/</code> directory
    1. Activate the plugin through the 'Plugins' menu in WordPress
    1. Paste or type HTML code in the category description and save.
    1. Enjoy HTML in your category descriptions
    
    == Frequently Asked Questions ==
    
    = How do I contact you? =
    
    1. **Email Address:** arno.esterhuizen+wordpress-plugins@gmail.com
    1. **Subject Line:** Question: WordPress Plugin: Allow HTML in Category Descriptions

    And then update html-in-category-descriptions.php to the following:

    <?php
    /*
    Plugin Name: HTML in Category Descriptions
    Version: 1.1
    Plugin URI:
    Description: Allows you to add HTML code in category descriptions
    Author: Arno Esterhuizen
    Author URI: arno.esterhuizen@gmail.com
    */
    
    $filters = array('pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description');
    foreach ( $filters as $filter ) {
    	remove_filter($filter, 'wp_filter_kses');
    }
    
    foreach ( array( 'term_description' ) as $filter ) {
    	remove_filter( $filter, 'wp_kses_data' );
    }
    ?>

    Cheers
    Arno Esterhuizen

  7. Arno Esterhuizen
    Member
    Posted 4 years ago #

    OK, the plugin's SVN source has been updated. Please test and see if it works for everyone?

    Cheers
    Arno

  8. dariodev
    Member
    Posted 3 years ago #

    Without plugin... Appended this code to theme's functions.php

    remove_filter( 'pre_term_description', 'wp_filter_kses' );
    remove_filter( 'term_description', 'wp_kses_data' );

  9. gonz0r
    Member
    Posted 3 years ago #

    The plugin is working for WordPress 3.0.1. and not only for category but also for custom taxonomy descriptions. Thank you for the plugin, it helped me a lot! :)

Topic Closed

This topic has been closed to new replies.

About this Topic