Get Started

Five Basic Steps

To create an option page with this framework, follow these steps.

1. Include the Library Class

2. Extend the Library Class

Admin_Page_Framework is the class name defined by this framework. The extended class name is up to your choice. As an example, here, APF_CreateSettingPage is used.

3. Define the SetUp() Method.

The SetUp() method is a special method defined by this framework that is automatically loaded when the admin menu is about to be created (with the the admin_menu hook). So we just overwrite the method in the extended class. All settings need to be set within this method.

4. Define methods for hooks.

The method name is made up of the hook prefix + the page slug. Here, do_ is used as an example. There are lots of available hooks supported by this framework.

For available action hooks and filters, please refer to Hooks and Callbacks.

5. Instantiate the Class

Simple Example Plugin



2 thoughts on “Get Started

Leave a Reply

Your email address will not be published. Required fields are marked *