diff --git a/functions.php b/functions.php index c3abeaf..3cb1be0 100644 --- a/functions.php +++ b/functions.php @@ -1,6 +1,6 @@ ' . $content . ''; +} + +add_shortcode( 'button', 'button_shortcode' ); + + +/** + * TinyMCE + */ + +function my_mce_buttons_2( $buttons ) { + array_unshift( $buttons, 'styleselect' ); + $buttons[] = 'hr'; + return $buttons; +} + +add_filter( 'mce_buttons_2', 'my_mce_buttons_2' ); + +function my_mce_before_init( $settings ) { + $style_formats = array( + /* + * Example + * + array( + 'title' => '', + 'selector' => '', + 'classes' => '' + ) */ + ); + $settings['style_formats'] = json_encode( $style_formats ); + return $settings; +} + +add_filter( 'tiny_mce_before_init', 'my_mce_before_init' );