Advertisement
skubik

WordPress TinyMCE Front-End Rendering

Aug 26th, 2015
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. In comments.php:
  2.  
  3. // Capture the TinyMCE editor output so we can pass it to comment_form() below
  4. ob_start();
  5. $TMPEDITOR['tinymce'] = true;
  6. $TMPEDITOR['media_buttons'] = false;
  7. $TMPEDITOR['teeny'] = true;
  8. $TMPEDITOR['textarea_rows'] = 7;
  9. $TMPEDITOR['quicktags'] = false;
  10. wp_editor('','comment', $TMPEDITOR);
  11. $TMPEDITOR = ob_get_contents();
  12. ob_end_clean();
  13.  
  14. $TMPCMNTFORM[ 'title_reply' ] = "";
  15. $TMPCMNTFORM[ 'comment_field' ] = $TMPEDITOR;
  16. $TMPCMNTFORM[ 'comment_notes_before' ] = "";
  17. $TMPCMNTFORM[ 'comment_notes_after' ] = "";
  18. $TMPCMNTFORM[ 'label_submit' ] = "Post";
  19. $TMPCMNTFORM[ 'logged_in_as' ] = "";
  20.  
  21. comment_form( $TMPCMNTFORM );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement