Support » Plugin: Easy Table of Contents » HTML in Header Label?

  • Resolved csigncsign

    (@csigncsign)


    Hi,

    I would like to have the header label in 2 lines, i.e. a line break.
    How can I add HTML to the header label?

    Example:

    
    Table of Contents
    That's what you'll find in this article

    Any idea please, for example a snippet to my functions.php?
    For HTML in widget titles I use for example this:

    
    function html_widget_title( $title ) {
        //HTML tag opening/closing brackets
        $title = str_replace( '[', '<', $title );
        $title = str_replace( '[/', '</', $title );
     
        //<strong></strong>
        $title = str_replace( 's]', 'strong>', $title );
        //<em></em>
        $title = str_replace( 'e]', 'em>', $title );
    	//linebreak
      	$title = str_replace( 'br]', 'br />', $title );
        return $title;
    }
    add_filter( 'widget_title', 'html_widget_title' );

    Can I add anywhere something similar to make a <br /> in the header label of this plugin please?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    I think you could hook into the ez_toc_title filter. It passes one attribute, the title, so you could probably sue the same code as for the widget title.

    Hope this helps!

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Oh, you can also use the ez_toc_title_allowable_tags to allow a <br> in the heading. The filter passes an empty string, you would pass <br> back from the filter.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.