Can’t add a class to links in the visual editor since WP 3.1?

Did this feature chang in 3.1?
I recall that I could change the class of the link in the thickbox popup.

Link dialog in WP 3.0.5
Link dialog in WP 3.1

Related posts

Leave a Reply

2 comments

  1. I think it’s a shame they have canceled the ability to add classes to links.
    Do you know a good workaround to add them?

    I now use this one, but this will wrap the anchor with another p or span tags and it’s really unnecessary ..

    //add tinyMCE styles
    function tc_add_formatTinyMCE($init) { 
        $init['theme_advanced_buttons2_add'] = 'styleselect';  
        $init['theme_advanced_styles'] = 'friendlyname=classname, friendlyname2=another-classname  ';  
        return $init;
    }
    
    add_filter('tiny_mce_before_init', 'tc_add_formatTinyMCE' );