Advertisement
Guest User

Untitled

a guest
Oct 20th, 2013
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.13 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Editor */
  4.  
  5. $content = 'This content gets loaded first.';
  6. $editor_id = 'my_frontend_editor';
  7. $settings =   array(
  8.     'wpautop' => true, // use wpautop?
  9.     'media_buttons' => true, // show insert/upload button(s)
  10.     'textarea_name' => $editor_id, // set the textarea name to something different, square brackets [] can be used here
  11.     'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
  12.     'tabindex' => '',
  13.     'editor_css' => '', // intended for extra styles for both visual and HTML editors buttons, needs to include the <style> tags, can use "scoped".
  14.     'editor_class' => '', // add extra class(es) to the editor textarea
  15.     'teeny' => false, // output the minimal editor config used in Press This
  16.     'dfw' => false, // replace the default fullscreen with DFW (supported on the front-end in WordPress 3.4)
  17.     'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
  18.     'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
  19. );
  20. wp_editor( $content, $editor_id, $settings );
  21.  
  22.  ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement