wp_editor example


function the_editor($content$id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2, $extended = true) {
    _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );

    wp_editor( $content$id, array( 'media_buttons' => $media_buttons ) );
}

/** * Perform the query to get the $metavalues array(s) needed by _fill_user and _fill_many_users * * @since 3.0.0 * @deprecated 3.3.0 * * @param array $ids User ID numbers list. * @return array of arrays. The array is indexed by user_id, containing $metavalues object arrays. */
do_action( 'edit_form_after_title', $post );

if ( post_type_supports( $post_type, 'editor' ) ) {
    $_wp_editor_expand_class = '';
    if ( $_wp_editor_expand ) {
        $_wp_editor_expand_class = ' wp-editor-expand';
    }
    ?> <div id="postdivrich" class="postarea<?php echo $_wp_editor_expand_class; ?>"> <?php     wp_editor(
        $post->post_content,
        'content',
        array(
            '_content_editor_dfw' => $_content_editor_dfw,
            'drag_drop_upload'    => true,
            'tabfocus_elements'   => 'content-html,save-post',
            'editor_height'       => 300,
            'tinymce'             => array(
                'resize'                  => false,
                'wp_autoresize_on'        => $_wp_editor_expand,
                'add_unload_trigger'      => false,
                
<?php         /* translators: Hidden accessibility text. */
        _e( 'Comment' );
        ?> </label> <?php     $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
    wp_editor(
        '',
        'replycontent',
        array(
            'media_buttons' => false,
            'tinymce'       => false,
            'quicktags'     => $quicktags_settings,
        )
    );
    ?> </div> <div id="edithead" style="display:none;"> <div class="inside"> <label for="author-name">
<?php     /* translators: Hidden accessibility text. */
    _e( 'Comment' );
    ?> </label> <?php     $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
    wp_editor(
        $comment->comment_content,
        'content',
        array(
            'media_buttons' => false,
            'tinymce'       => false,
            'quicktags'     => $quicktags_settings,
        )
    );
    wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
    ?> </div> </div><!-- /post-body-content --> <div id="postbox-container-1" class="postbox-container"> <div id="submitdiv" class="stuffbox" > <h2>
?> <label for="attachment_content" class="attachment-content-description"><strong><?php _e( 'Description' ); ?></strong> <?php
    if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) {
        echo ': ' . __( 'Displayed on attachment pages.' );
    }

    ?> </label> <?php wp_editor( format_to_edit( $post->post_content ), 'attachment_content', $editor_args ); ?> </div> <?php
    $extras = get_compat_media_markup( $post->ID );
    echo $extras['item'];
    echo '<input type="hidden" id="image-edit-context" value="edit-attachment" />' . "\n";
}

/** * Displays non-editable attachment metadata in the publish meta box. * * @since 3.5.0 */
Home | Imprint | This part of the site doesn't use cookies.