# [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. [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/michaeluno/admin-page-framework/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/michaeluno/admin-page-framework/?branch=master)

Admin Page Framework - Text, Password, and Textarea

Admin Page Framework - Selectors   Admin Page Framework - Image, Media Library, and File Uploads   Admin Page Framework - Taxonomies and Post Types Checklist   Admin Page Framework - Misc   Admin Page Framework - Form Input Verification   Admin Page Framework - Export and Import Options   Admin Page Framework - Contextual Help Pane   Admin Page Framework - Custom Post Type and Meta Box   Admin Page Framework - Meta Boxes in Pages Added by the Framework   Admin Page Framework - Form Fields in Taxonomy Page   Admin Page Framework - Form Sections in Tabbed Boxes and Repeatable Option   Admin Page Framework - Auto-complete Custom Field Type   Admin Page Framework - Widget Form Fields
## 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

Admin Page Framework - Getting Started

```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() { ?>

Say Something

This is my first admin page!

Admin Page Framework - My First Form

```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://admin-page-framework.michaeluno.jp/tutorials/) - [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! [![Donate with PayPal](https://www.paypal.com/en_US/i/btn/x-click-but04.gif)](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)