bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

font size and color plugin

(3 posts)
  • Started 7 months ago by itissue
  • Latest reply from anasohbet
  • This topic is not resolved
  1. itissue
    Member

    I was wondering if there's a plugin already out there for font size and font color. They should enable the font tag or style=""; in the tags. Also, why can't we use heading tags such as <h1> or choose an image width and height in our image tags?

    Posted 7 months ago #
  2. itissue
    Member

    Nevermind. I created a plugin that I can modify anytime I want. Here's the code if you're interested. You don't even need the add image plugin.

    <?php
    /*
    Plugin name: Extra html tags
    plugin author: Sue
    plugin description: Allow extra html tags, even depreciated
    */
    
    function allow_extra_tags( $tags )
    {
        $tags['a'] = array(
            'href' => array(),
            'title' => array(),
            'rel' => array(),
            'target' => array(),
            'alt' => array()
        );
        $tags['i'] = array();
        $tags['b'] = array();
        $tags['del'] = array();
        $tags['p'] = array(
    	'style'=> array()
        );
        $tags['strike'] = array();
        $tags['img'] = array(
            'src'=> array(),
            'alt' => array(),
            'title' => array(),
            'width' => array(),
            'height' => array(),
            'style' => array()
        );
        $tags['font'] = array(
            'style' => array(),
        );
        $tags['br'] = array();
        $tags['h1'] = array();
        $tags['h2'] = array();
        $tags['h3'] = array();
        $tags['h4'] = array();
    
        return $tags;
    }
    add_filter( 'bb_allowed_tags', 'allow_extra_tags' );
    ?>
    Posted 7 months ago #
  3. Thnks, itissue.

    Posted 7 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.