WordPress.org

Ready to get started?Download WordPress

Forums

Prevent saving post on publishing (1 post)

  1. mefromnl
    Member
    Posted 2 years ago #

    Hi,

    When publishing a post (or saving a draft) I run a hook on 'save_post' to add a meta.

    I want to prevent the actual post from being saved if any errors occur when running save_post. I've noticed there are other hooks I can use, like 'pre_post_update' but I wouldn't know how to prevent a post from being saved.

    How can I accomplish this?

Topic Closed

This topic has been closed to new replies.

About this Topic