write_post example

str_replace( array( "\r\n", "\r", "\n" ), '<br />', $_POST['content'] )
            );
        }

        edit_post();
        wp_dashboard_quick_press();
        exit;

    case 'postajaxpost':
    case 'post':
        check_admin_referer( 'add-' . $post_type );
        $post_id = 'postajaxpost' === $action ? edit_post() : write_post();
        redirect_post( $post_id );
        exit;

    case 'edit':
        $editing = true;

        if ( empty( $post_id ) ) {
            wp_redirect( admin_url( 'post.php' ) );
            exit;
        }

        
Home | Imprint | This part of the site doesn't use cookies.