O'Reilly logo

WordPress Plugin Development Cookbook by Yannick Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Saving user-submitted content in custom post types

When visitors click on the Submit button on the form created in the previous recipe, the target of the form is set to be the same page that is hosting the submission form. Since this page is not capable of handling form data, we must implement an action hook that intercepts this post data and sends it to a processing function that we will define.

This recipe shows how to implement a function responsible for processing user input.

Getting ready

You should be running the final version of the Book Reviews plugin created in Chapter 4, The Power of Custom Post Types, and should have already followed the Creating a client-side content submission form recipe. Alternatively, you can get the file from the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required