• avocado

    (@avocado)


    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!

Viewing 5 replies - 1 through 5 (of 5 total)
  • red-star

    (@red-star)

    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.

    Thread Starter avocado

    (@avocado)

    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.

    red-star

    (@red-star)

    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 🙂

    Thread Starter avocado

    (@avocado)

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

    maerk

    (@maerk)

    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.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘edit_post vs. save_post’ is closed to new replies.