# [Admin Page Framework](http://wordpress.org/plugins/admin-page-framework/) ## Welcome to Admin Page Framework GitHub Repository *Admin Page Framework* is an OOP based open source WordPress library that facilitates theme and plugin development. [](https://scrutinizer-ci.com/g/michaeluno/admin-page-framework/?branch=master)
## Installation There are mainly two ways to include the framework. - Use the framework loader plugin. - The latest development version can be found [here](https://github.com/michaeluno/admin-page-framework/branches). - The latest stable version can be downloaded [here](http://downloads.wordpress.org/plugin/admin-page-framework.latest-stable.zip). - Use the generated framework files which can be downloaded via `Dashboard` -> `Admin Page Framework` -> `Tools` -> `Generator`. For more details, see the **Getting Started** (`Dashboard` -> `Admin Page Framework` -> `Help` -> `Getting Started`) of the admin pages of the loader plugin. ## Examples ### Create a Page ```PHP setRootMenuPage( 'Settings' ); // where to belong $this->addSubMenuItem( array( 'title' => 'My First Page', 'page_slug' => 'myfirstpage' ) ); } /** * @callback action do_{page slug} */ public function do_myfirstpage() { ?>This is my first admin page!
```PHP
setRootMenuPage( 'My Settings' ); // create a root page
$this->addSubMenuItem(
array(
'title' => 'My First Form',
'page_slug' => 'my_first_form'
)
);
}
/**
* The pre-defined callback method that is triggered when the page loads.
* @callback action load_{page slug}
*/
public function load_my_first_form( $oAdminPage ) {
$this->addSettingSections(
array(
'section_id' => 'my_first_text_section',
'page_slug' => 'my_first_form',
)
);
$this->addSettingFields(
array(
'field_id' => 'text',
'section_id' => 'my_first_text_section',
'title' => 'Text',
'type' => 'text',
'default' => 123456,
),
array(
'field_id' => 'submit',
'type' => 'submit',
)
);
}
}
new APF_MyFirstFrom;
```
See more code examples in `Dashboard` -> `AdminPageFramework` -> `Help` -> `Examples`.
## Resources
- [Online documentation](http://admin-page-framework.michaeluno.jp/en/v3/)
- [Online tutorials](http://en.michaeluno.jp/admin-page-framework/tutorials-v3/)
- [FAQ](https://wordpress.org/plugins/admin-page-framework/faq/)
- [Other Notes](https://wordpress.org/plugins/admin-page-framework/other_notes/)
- [Change Log](https://wordpress.org/plugins/admin-page-framework/changelog/)
### Getting Helped
- [Support Forum](http://wordpress.org/support/plugin/admin-page-framework)
## Contributions
Anyone is welcome to contribute to *Admin Page Framework*. There are various ways you can contribute:
- Report [bugs](https://github.com/michaeluno/admin-page-framework/issues).
- Post ideas on [enhancements](https://github.com/michaeluno/admin-page-framework/issues?direction=desc&labels=Enhancement&page=1&sort=created&state=open).
- Send us a Pull Request with your bug fixes and/or new features.
- Write a [custom field type](http://admin-page-framework.michaeluno.jp/en/v3/package-AdminPageFramework.FieldType.html).
- Write [test cases](test/readme.md).
- Improve the [documentation](https://github.com/michaeluno/admin-page-framework/blob/master/documentation_guideline.md).
- Tweak the styling of the framework page elements.
- Translate the language files in the [language](https://github.com/michaeluno/admin-page-framework/tree/master/language) directory to your native language.
- Possibly more.
### Framework Core Development
See the [contribution guideline](./contributing.md).
### Supporting Future Development
If you like the library, please rate and review it in the [WordPress Plugin Directory](http://wordpress.org/support/view/plugin-reviews/admin-page-framework?filter=5). Also donation would be greatly appreciated. Thank you!
[](http://en.michaeluno.jp/donate)
## Copyright and License
### Admin Page Framework (Framework Files)
[MIT license](development/LICENSE.txt)
### Admin Page Framework - Loader (WordPress Plugin)
[GPL v2](./LICENSE.txt)