[外掛]WordPress外掛插件:新增分頁按鈕到tinymce編輯器中

將以下語法加入您的佈景主題中的functions.php

/* Add Next Page Button in First Row */
add_filter( 'mce_buttons', 'my_add_next_page_button', 1, 2 ); // 1st row

/**
* Add Next Page/Page Break Button
* in WordPress Visual Editor
*
* @link http://shellcreeper.com/?p=889
*/
function my_add_next_page_button( $buttons, $id ){

/* only add this for content editor */
if ( 'content' != $id )
return $buttons;

/* add next page after more tag button */
array_splice( $buttons, 13, 0, 'wp_page' );

return $buttons;
}
nextpage buttion
nextpage buttion

這樣做之後你的tinymce editor就可以有插入分頁的按鈕

Wayne

英語及電腦教學,總體經濟。 網站 : http://blog.realtw.com

Comments are closed.

Free counters!