![screen-shot-2016-10-07-at-4-19-25-pm](http://wiki.christinewilson.uk/wp-content/uploads/2016/10/Screen-Shot-2016-10-07-at-4.19.25-PM-300x168.png)
![screen-shot-2016-10-07-at-4-19-31-pm](http://wiki.christinewilson.uk/wp-content/uploads/2016/10/Screen-Shot-2016-10-07-at-4.19.31-PM-300x168.png)
![screen-shot-2016-10-07-at-4-20-38-pm](http://wiki.christinewilson.uk/wp-content/uploads/2016/10/Screen-Shot-2016-10-07-at-4.20.38-PM-300x232.png)
![screen-shot-2016-10-07-at-4-20-45-pm](http://wiki.christinewilson.uk/wp-content/uploads/2016/10/Screen-Shot-2016-10-07-at-4.20.45-PM-300x104.png)
add_action( 'after_setup_theme', 'wpse3882_after_setup_theme' ); function wpse3882_after_setup_theme() { add_editor_style(); } add_filter('mce_buttons_2', 'wpse3882_mce_buttons_2'); function wpse3882_mce_buttons_2($buttons) { array_unshift($buttons, 'styleselect'); return $buttons; } add_filter('tiny_mce_before_init', 'wpse3882_tiny_mce_before_init'); function wpse3882_tiny_mce_before_init($settings) { $settings['theme_advanced_blockformats'] = 'p,h2,h3,h4'; // From http://tinymce.moxiecode.com/examples/example_24.php $style_formats = array( array('title' => 'Link With Icon', 'selector' => 'a', 'classes' => 'cta-link') ); // Before 3.1 you needed a special trick to send this array to the configuration. // See this post history for previous versions. $settings['style_formats'] = json_encode( $style_formats ); return $settings; }