Created
June 9, 2013 22:01
-
-
Save ryanburnette/5745431 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Set Special Formats in TinyMCE | |
function ts_beforemce( $settings ) { | |
$style_formats = array( | |
array( | |
'title' => 'Button', | |
'selector' => 'a', | |
'classes' => 'button' | |
) | |
/* | |
array( | |
'title' => 'Callout Box', | |
'block' => 'div', | |
'classes' => 'callout', | |
'wrapper' => true | |
), | |
array( | |
'title' => 'Bold Red Text', | |
'inline' => 'span', | |
'styles' => array( | |
'color' => '#f00', | |
'fontWeight' => 'bold' | |
) | |
) | |
*/ | |
); | |
$settings['style_formats'] = json_encode( $style_formats ); | |
return $settings; | |
} | |
//add_filter('tiny_mce_before_init', 'ts_beforemce'); | |
function ts_buttons( $buttons ) { | |
array_unshift( $buttons, 'styleselect' ); | |
return $buttons; | |
} | |
//add_filter('mce_buttons_2', 'ts_buttons'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment