
WordPress Plugin Development Cookbook
By :

After creating a default set of values for our plugin's configuration and creating an interface to allow users to modify and update those values, we are now ready to start using these options when pages are rendered using our additional plugin functionality. Going back to the Google Analytics example created in Chapter 2, Plugin Framework Basics, this recipe shows how to access the plugin options data using a familiar function to make the existing code much more flexible.
You should have already followed the Adding custom help pages recipe, and the resulting plugin should be active on your development site. Alternatively, you can get the resulting code (ch3/ch2-page-header-output/ch2-page-header-output-v8.php
) from the book's GitHub page. You should rename the ch2-page-header-output-v8.php
file as ch2-page-header-output.php
before starting this recipe.
Follow these steps to learn...