• Hi.

    I’ve a few questions regarding this.

    1. Does the post ID have to be included in teh query string for a user to edit their post?
    2. When the user updates their post, they land on teh ‘edit post’ page again and are presented with a confirmation message however the form inputs reflect the data prior to the update. Is this due to the order of code execution, i.e. prepare_form() / edit_form() being run before submit_post()?

    Thanks!

    http://wordpress.org/extend/plugins/wp-user-frontend/

Viewing 1 replies (of 1 total)
  • Hi Phil,

    1. The answer is yes. Otherwise the page has no way of knowing which post to edit. Howver I’m curious to why you ask this.

    2. This is a bug which I have already come across and fixed in my development version.

    If you want to fix it itself you need to change the following lines in the file wpuf-edit-post.php.

    //process post
            if ( isset( $_POST['wpuf_edit_post_submit'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'wpuf-edit-post' ) ) {
                $this->submit_post();
            }

    to

    //process post
            if ( isset( $_POST['wpuf_edit_post_submit'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'wpuf-edit-post' ) ) {
                $this->submit_post();
    		$curpost = get_post( $post_id );
            }

    Cheers
    The Professor

Viewing 1 replies (of 1 total)

The topic ‘Edit Post’ is closed to new replies.