format_to_edit example


            $value = apply_filters( "{$field_no_prefix}_edit_pre", $value$post_id );
        } else {
            $value = apply_filters( "edit_post_{$field}", $value$post_id );
        }

        if ( in_array( $field$format_to_edit, true ) ) {
            if ( 'post_content' === $field ) {
                $value = format_to_edit( $valueuser_can_richedit() );
            } else {
                $value = format_to_edit( $value );
            }
        } else {
            $value = esc_attr( $value );
        }
    } elseif ( 'db' === $context ) {
        if ( $prefixed ) {

            /** * Filters the value of a specific post field before saving. * * The dynamic portion of the hook name, `$field`, refers to the post * field name. * * @since 2.3.0 * * @param mixed $value Value of the post field. */

function get_comment_to_edit( $id ) {
    $comment = get_comment( $id );
    if ( ! $comment ) {
        return false;
    }

    $comment->comment_ID      = (int) $comment->comment_ID;
    $comment->comment_post_ID = (int) $comment->comment_post_ID;

    $comment->comment_content = format_to_edit( $comment->comment_content );
    /** * Filters the comment content before editing. * * @since 2.0.0 * * @param string $comment_content Comment content. */
    $comment->comment_content = apply_filters( 'comment_edit_pre', $comment->comment_content );

    $comment->comment_author       = format_to_edit( $comment->comment_author );
    $comment->comment_author_email = format_to_edit( $comment->comment_author_email );
    
?> <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.