WordPress.org

Support

Support » Plugins and Hacks » Hacks » Interrupting 'save_post'

Interrupting 'save_post'

  • I have created a custom post type in wordpress with custom meta fields.

    These have all be done with the wordpress php functions.

    I need validation on these custom meta fields and I am currently using this messy method:

    http://bit.ly/gTwTyf

    I understand I might have to stick with this method.

    But what I need to know is how could I prevent the post from saving if the meta fields dont meet requirements.

Viewing 1 replies (of 1 total)
  • Interrupting post saving might not be a good way because all content would be lost. (Imagine typing a long post then losing it all because of a little error in a meta field…). If the meta value is wrong, don’t save it or even better, use a default value.

Viewing 1 replies (of 1 total)
  • The topic ‘Interrupting 'save_post'’ is closed to new replies.