Giter Site home page Giter Site logo

sp1ke77 / admin-page-framework Goto Github PK

View Code? Open in Web Editor NEW

This project forked from michaeluno/admin-page-framework

0.0 1.0 0.0 15.33 MB

Facilitates WordPress plugin and theme development.

Home Page: http://en.michaeluno.jp/admin-page-framework/

License: Other

PHP 98.51% CSS 0.70% HTML 0.02% Shell 0.76% Visual Basic 0.01%

admin-page-framework's Introduction

Welcome to our GitHub Repository

Admin Page Framework is an OOP based open source WordPress library that facilitates theme and plugin development.

Scrutinizer Code Quality

Screenshots

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.
    • The latest stable version can be downloaded here.
  • 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.

Example

Create a Page

Admin Page Framework - Getting Started

<?php
/* Plugin Name: Admin Page Framework - Getting Started */ 

if ( ! class_exists( 'AdminPageFramework' ) ) {
    include( dirname( __FILE__ ) . '/library/admin-page-framework/admin-page-framework.php' );
}
    
class APF extends AdminPageFramework {

    public function setUp() {
        
        $this->setRootMenuPage( 'Settings' );    // where to belong
        $this->addSubMenuItem(
            array(
                'title'        => 'My First Page',
                'page_slug'    => 'myfirstpage'
            )
        );
            
    }

    public function do_myfirstpage() {  // do_{page slug}
        ?>
        <h3>Say Something</h3>
        <p>This is my first admin page!</p>
        <?php   
    }
    
}
new APF;

Create a Form

Admin Page Framework - My First Form

<?php
/* Plugin Name: Admin Page Framework - My First Form */ 

if ( ! class_exists( 'AdminPageFramework' ) ) {
    include( dirname( __FILE__ ) . '/library/admin-page-framework/admin-page-framework.php' );
}
    
class APF_MyFirstFrom extends AdminPageFramework {

    public function setUp() {
        
        $this->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.
     */
    public function load_my_first_form( $oAdminPage ) {    // load_{page slug}
    
        $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.

Documentation

Online documentation

Tutorials

Online tutorials

  1. Create an Admin Page
  2. Create a Form
  3. Create a Page Group
  4. Create In-page Tabs
  5. Organize a Form with Sections
  6. Use Section Tabs and Repeatable Sections
  7. Validate Submitted Form Data of a Single Field
  8. Validate Submitted Form Data of Multiple Fields
  9. Add a Meta Box in an Admin Page
  10. Add a Page Meta Box Specific to an In-page Tab
  11. Add a Meta Box for Posts
  12. Create a Custom Post Type and Custom Taxonomy
  13. Add a Meta Box to a Custom Post Type

Bugs

If you find an issue, let us know here!

Support

This is a developer's portal for Admin Page Framework and should not be used for support. Please visit the support forums.

Contributions

Anyone is welcome to contribute to Admin Page Framework. There are various ways you can contribute:

Supporting Future Development

If you like the library, please rate and review it in the WordPress Plugin Directory. Also donation would be greatly appreciated. Thank you!

Donate with PayPal

Copyright and License

Admin Page Framework (Framework Files)###

Released under the MIT license. Copyright © 2013-2015 Michael Uno

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

http://opensource.org/licenses/MIT

Admin Page Framework - Loader (WordPress Plugin)

Released under the GPL v2 or later. Copyright © 2013-2015 Michael Uno

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

admin-page-framework's People

Contributors

dmgawel avatar fredpik avatar michaeluno avatar pcraig3 avatar scrutinizer-auto-fixer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.