WordPress.org

Ready to get started?Download WordPress

Forums

edit_post vs. save_post (6 posts)

  1. avocado
    Member
    Posted 8 years ago #

    Can someone please help me understand what the differences are between the edit_post and save_post hooks?

    Also, is there anywhere where the API is better documented than on the codex?

    Thanks!

  2. red-star
    Member
    Posted 8 years ago #

    Edit post: you can edit the post you already made.

    Save post: when you made a post you click on the save, to put it on the web.

  3. avocado
    Member
    Posted 8 years ago #

    So does edit_post get called when you save a new post?

    And does save_post get called when you save changes to an existing post?

    I just don't understand what the difference is and when each is called - i.e. why there are two different hooks, and in what circumstances I should use each one.

  4. red-star
    Member
    Posted 8 years ago #

    Edit_post get called, when you are logt in as admin. The link will also show only for you on your blog.

    The differents between edit and save is pretty clear I think. If you could not edit a post anymore, but after saving you see something realy looking clombsy, then you would be happy you could edit :)

  5. avocado
    Member
    Posted 8 years ago #

    So edit_post gets called when you load the editing form, as opposed to when you save the edits?

  6. maerk
    Member
    Posted 8 years ago #

    To find more information about wordpress functions, you can always google the function name. They're pretty unique, and it often turns up quite useful information.

Topic Closed

This topic has been closed to new replies.

About this Topic