With the configuration page in place, plugin users will be able to modify configuration options and submit them to be stored in the WordPress database. The missing link at this time is the creation of a data processing function that will receive the data posted by the user and store it in the site's options
table.
This recipe describes how to implement a data processing function to validate that the information being sent for storage is legitimate and to store the information in an options array.
You should have already followed the Rendering the admin page contents using HTML recipe and the resulting plugin should still be active in your development site. Alternatively, you can get the resulting code (Chapter 3/ch2-page-header-output/ch2-page-header-output-v5.php
) from the downloaded code bundle. You should rename the file ch2-page-header-output-v5.php
as ch2-page-header-output.php
before starting this recipe.