Advertisement
sgaffney

wp_editor

Nov 2nd, 2011
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.93 KB | None | 0 0
  1. <div class="tumbleboard-tinymce">
  2.  
  3.     <?php if ( bbp_is_topic_edit() ) : ?>
  4.  
  5.         <?php
  6.             $post = get_post($post_id, 'OBJECT');
  7.             $tabindex = bbp_get_tab_index();
  8.             $settings = array(
  9.                     'wpautop' => true,
  10.                     'media_buttons' => true,
  11.                     'textarea_rows' => '15',
  12.                     'tabindex' => $tabindex,
  13.                     'editor_class' => 'tumble',
  14.                     'tinymce' => true,
  15.                     'quicktags' => true
  16.             );
  17.  
  18.             wp_editor( $post->post_content, 'bbp_topic_content', $settings );
  19.  
  20.         ?>
  21.  
  22.         <?php else: ?>
  23.  
  24.         <?php
  25.             $post = get_post($post_id, 'OBJECT');
  26.             $tabindex = bbp_get_tab_index();
  27.             $settings = array(
  28.                     'wpautop' => true,
  29.                     'media_buttons' => true,
  30.                     'textarea_rows' => '15',
  31.                     'tabindex' => $tabindex,
  32.                     'editor_class' => 'tumble',
  33.                     'tinymce' => true,
  34.                     'quicktags' => true
  35.             );
  36.  
  37.             wp_editor( '', 'bbp_topic_content', $settings );
  38.  
  39.         ?>
  40.  
  41.     <?php endif; ?>
  42.  
  43. </div>
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement