Advertisement
pusatdata

Kode Menambah Button PageBreak di Visual Editor Wordpress

Oct 2nd, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. paste kode berikut di functions.php
  2.  
  3.  
  4. /* Add Next Page Button in First Row */
  5. add_filter( 'mce_buttons', 'my_add_next_page_button', 1, 2 ); // 1st row
  6.  
  7. /**
  8. * Add Next Page/Page Break Button
  9. * in WordPress Visual Editor
  10. *
  11. * @link https://shellcreeper.com/?p=889
  12. */
  13. function my_add_next_page_button( $buttons, $id ){
  14.  
  15. /* only add this for content editor */
  16. if ( 'content' != $id )
  17. return $buttons;
  18.  
  19. /* add next page after more tag button */
  20. array_splice( $buttons, 13, 0, 'wp_page' );
  21.  
  22. return $buttons;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement