Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Uno michaeluno

View GitHub Profile
@michaeluno
michaeluno / admin-page-framework-demo-dynami-dropdown-in-repeatable-sections.php
Last active Nov 6, 2016
Demonstrates how a drop-down list can be updated dynamically in repeatable sections using Admin Page Framework.
View admin-page-framework-demo-dynami-dropdown-in-repeatable-sections.php
<?php
/**
* Plugin Name: Admin Page Framework Demo - Dynamic Drop-down in Repeatable Sections
* Plugin URI: http://en.michaeluno.jp/admin-page-framework
* Description: Demonstrates how a drop-down list can be updated dynamically in repeatable sections.
* Author: Michael Uno
* Author URI: http://michaeluno.jp
* Version: 1.0.0
*/
@michaeluno
michaeluno / admin-page-framework-ajax-fields.php
Created Jul 26, 2016
Demonstrates how form fields can be updated using Ajax with Admin Page Framework.
View admin-page-framework-ajax-fields.php
<?php
/**
* Plugin Name: Admin Page Framework Demo - Ajax FIelds
* Plugin URI: http://en.michaeluno.jp/admin-page-framework
* Description: Demonstrates how fields can be updated with Ajax.
* Author: Michael Uno
* Author URI: http://michaeluno.jp
* Version: 1.0.0
* Requirements: PHP 5.2.4 or above, WordPress 3.4 or above. Admin Page Framework 3.0.0 or above
*/
@michaeluno
michaeluno / admin-page-framework-tutorial-14-taxonomy-fields.php
Created Jun 5, 2016
Demonstrates the use of custom taxonomy fields with Admin Page Framework, a WordPress libaray.
View admin-page-framework-tutorial-14-taxonomy-fields.php
<?php
/**
* Plugin Name: Admin Page Framework Tutorial 14 - Taxonomy Fields
* Plugin URI: http://en.michaeluno.jp/admin-page-framework
* Description: Demonstrates the use of custom taxonomy fields with Admin Page Framework.
* Author: Michael Uno
* Author URI: http://michaeluno.jp
* Version: 1.0.0
*/
@michaeluno
michaeluno / admin-page-framework-custom-text-after-form-submission.php
Last active Nov 6, 2016
Displays custom text after the form is submitted with Admin Page Framework, a wordpress plugin/theme framework.
View admin-page-framework-custom-text-after-form-submission.php
<?php
/*
Plugin Name: Admin Page Framework - Custom Text After Form Submission
Plugin URI: http://en.michaeluno.jp/admin-page-framework
Description: Displays custom text after the form is submitted.
Author: Michael Uno
*/
// Include the library file. Set your file path here.
include( dirname( dirname( __FILE__ ) ) . '/admin-page-framework/library/apf/admin-page-framework.php' );
@michaeluno
michaeluno / APF_Test_NamespaceHooks.php
Last active Mar 27, 2016
Testing name space hooks with Admin Pag Framework.
View APF_Test_NamespaceHooks.php
<?php
namespace Foo\Bar;
class APF_Test_NamespaceHooks extends \AdminPageFramework {
/**
* Sest up pages.
*/
public function setUp() {
@michaeluno
michaeluno / APF_CustomTextFieldType.php
Created Feb 28, 2016
A sample WordPress plugin that demonstrates a custom text field type for Admin Page Framework.
View APF_CustomTextFieldType.php
<?php
class APF_CustomTextFieldType extends AdminPageFramework {
public function setUp() {
$this->setRootMenuPage( 'Sample' ); // where to belong
$this->addSubMenuItem(
array(
'title' => __( 'Custom Text Field Type', 'admin-page-framework-demo-custom-field-type' ), // page and menu title
'page_slug' => 'apf_custom_text_field_type' // page slug
@michaeluno
michaeluno / patch-admin-page-framework-global-post-variable.php
Created Sep 9, 2015
Restores the global $post variable in the admin area as some plugins modify it.
View patch-admin-page-framework-global-post-variable.php
<?php
/*
Plugin Name: Patch - Admin Page Framework Global Post Variable
Description: Restores the global $post variable in the admin area as some plugins modify it.
*/
class Patch_AdminPageFramework_GlobalPostVariable {
public function __construct() {
@michaeluno
michaeluno / patch-wr-mega-menu-and-admin-page-framework.php
Last active Sep 10, 2015
Fixes a conflict of WR MegaMenu and Admin Page Framework.
View patch-wr-mega-menu-and-admin-page-framework.php
<?php
/*
Plugin Name: Patch - WR MegaMenu & Admin Page Framework Conflict
*/
class FixConflict_WRMegaMenuAndAdminPageFramework {
public function __construct() {
@michaeluno
michaeluno / admin-page-framework-test-tabs-in-post-listing-pages.php
Created Jun 29, 2015
Tests tabs in post listing pages with Admin Page Framework.
View admin-page-framework-test-tabs-in-post-listing-pages.php
<?php
/*
Plugin Name: Admin Page Framework Test - Tabs in Post Listing Page.
Plugin URI: http://en.michaeluno.jp/admin-page-framework
Description: Tests tabs in post listing pages.
Author: Michael Uno
Author URI: http://michaeluno.jp
Version: 1.0.0
*/
@michaeluno
michaeluno / admin-page-framework-example-sortable-labels.php
Created May 21, 2015
Shows how to create asortable lables with Admin Page Framework
View admin-page-framework-example-sortable-labels.php
<?php
/*
Plugin Name: Admin Page Framework Example - Sortable Labels
Plugin URI: http://en.michaeluno.jp/admin-page-framework
Description: Shows how to create asortable lables.
Author: Michael Uno
Author URI: http://michaeluno.jp
Version: 1.0.0
Requirements: PHP 5.2.4 or above, WordPress 3.3 or above. Admin Page Framework 3.5.8 or above
*/