• Stars
    star
    321
  • Rank 130,341 (Top 3 %)
  • Language
    PHP
  • License
    Other
  • Created over 11 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Facilitates WordPress plugin and theme development.

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 Build Status

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.

Examples

Create a Page

Admin Page Framework - Getting Started

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

include( dirname( __FILE__ ) . '/library/apf/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'
            )
        );
            
    }
    
    /**
     * @callback        action      do_{page slug}
     */
    public function do_myfirstpage() {
        ?>
        <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 */ 

include( dirname( __FILE__ ) . '/library/apf/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.
     * @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

Getting Helped

Contributions

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

  • Report bugs.
  • Post ideas on enhancements.
  • Send us a Pull Request with your bug fixes and/or new features.
  • Write a custom field type.
  • Write test cases.
  • Improve the documentation.
  • Tweak the styling of the framework page elements.
  • Translate the language files in the language directory to your native language.
  • Possibly more.

Browser Compatibility

Internet Explorer 9 or below is not supported.

The framework uses

  • CSS flex.

Framework Core Development

See the contribution guideline.

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)

MIT license

Admin Page Framework - Loader (WordPress Plugin)

GPL v2

More Repositories

1

php-simple-web-scraper

A PHP application which runs on Heroku and dumps web site outputs including JavaScript generated contents.
PHP
21
star
2

Task-Scheduler

Provides a task management system for WordPress
PHP
13
star
3

amazon-auto-links

A WordPress plugin that generates links of Amazon products just coming out today. You just pick categories and they appear even in JavaScript disabled browsers.
PHP
6
star
4

_fix-simplepie-errors

A WordPress plugin that adds a temporary fix for an incompatibility issue of the built-in library, SimplePie 1.3.1, with PHP 7.1 or above.
PHP
6
star
5

notepad-plus-plus-php-definition

PHP Syntax Highlight Definition for Notepad++.
3
star
6

web-page-dumper

Dumps web page outputs including JavaScript generated contents.
CSS
3
star
7

Auto-Post

A WordPress plugin that creates posts automatically serving as a Task Scheduler module.
PHP
2
star
8

Admin-Page-Framework-Demo---Custom-Field-Type

Demonstrates how to implement a custom field type using Admin Page Framework
PHP
2
star
9

server-information

A WordPress plugin that lets the user submit their server information to a specified email address.
PHP
2
star
10

header-connection-close

A WordPress plugin that boosts the site performance with a little hack to close HTTP connection between the server and client.
Shell
2
star
11

my-first-plugin

A very first WordPress plugin that uses Admin Page Framework.
PHP
2
star
12

PHP-Class-Files-Script-Generator

A set of tools to generate PHP scripts including a minifed version converter, a file list creator etc.
PHP
2
star
13

Fetch-Tweets

A WordPress plugin that fetches tweets from twitter.com with the Twitter API.
PHP
2
star
14

sample-tdd-plugin

A WordPress plugin that does nothing but just is used to test test-driven development with some third-party testing systems.
Shell
1
star
15

custom-scrollbar

A WordPress plugin that lets you add custom scrollbars to specified HTML elements.
PHP
1
star
16

admin-page-framework-compiler

A compiler library for Admin Page Framework, a WordPress development framework.
PHP
1
star
17

amazon-auto-links-example-templates

A WordPress plugin that includes example templates for Amazon Auto Links.
JavaScript
1
star
18

amazon-auto-links-slider-template

An Amazon Auto Links template that displays Amazon products in a slider.
JavaScript
1
star
19

task-scheduler-sample-action-module

A sample action module for the Task Scheduler WordPress plugin.
PHP
1
star