Skip to content

Instantly share code, notes, and snippets.

@ArnaudBan
Created June 25, 2012 15:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ArnaudBan/2989225 to your computer and use it in GitHub Desktop.
WordPress function to show the "next-page" button in the tinyMCE
// 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