Created
June 25, 2012 15:20
-
-
Save ArnaudBan/2989225 to your computer and use it in GitHub Desktop.
WordPress function to show the "next-page" button in the tinyMCE
This file contains hidden or 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
// Add "Next page" button to TinyMCE | |
function add_next_page_button( $mce_buttons ) { | |
$pos = array_search( 'wp_more', $mce_buttons, true ); | |
if ( $pos !== false ) { | |
$tmp_buttons = array_slice( $mce_buttons, 0, $pos+1 ); | |
$tmp_buttons[] = 'wp_page'; | |
$mce_buttons = array_merge( $tmp_buttons, array_slice( $mce_buttons, $pos+1 ) ); | |
} | |
return $mce_buttons; | |
} | |
add_filter( 'mce_buttons', 'add_next_page_button' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment