From 3c992204bb268d22d96a55189a64f7c1c1ebd23f Mon Sep 17 00:00:00 2001 From: Seaton Jiang Date: Sat, 14 Mar 2020 10:17:31 +0800 Subject: [PATCH] feat: add some new mce (#38) --- inc/theme-shortcode.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/inc/theme-shortcode.php b/inc/theme-shortcode.php index df4d48c..8283ce0 100644 --- a/inc/theme-shortcode.php +++ b/inc/theme-shortcode.php @@ -3,7 +3,7 @@ * 文章短代码 * @author Seaton Jiang * @license MIT License - * @version 2020.02.26 + * @version 2020.03.14 */ function h2title($atts, $content = null, $code = "") @@ -190,6 +190,15 @@ function more_button() } } +function add_more_buttons($buttons) { + $buttons[] = 'hr'; + $buttons[] = 'wp_page'; + $buttons[] = 'fontsizeselect'; + $buttons[] = 'styleselect'; +return $buttons; +} +add_filter("mce_buttons", "add_more_buttons"); + function register_button($buttons) { array_push($buttons, " ", "h2title");