feat: add some new mce (#38)

pull/230/head
Seaton Jiang 2020-03-14 10:17:31 +08:00
parent 54d45d6a81
commit 3c992204bb
1 changed files with 10 additions and 1 deletions

View File

@ -3,7 +3,7 @@
* 文章短代码
* @author Seaton Jiang <seaton@vtrois.com>
* @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");