This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! class_exists( 'LinkFieldType' ) ) : | |
class LinkFieldType extends AdminPageFramework_FieldType { | |
/** | |
* Defines the field type slugs used for this field type. | |
*/ | |
public $aFieldTypeSlugs = array( 'link', ); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Plugin Name: My Admin Page Template */ | |
add_action( 'admin_menu', 'my_admin_menu_func' ); | |
function my_admin_menu_func() { | |
add_options_page( "My Admin Page", "My Admin Page", "manage_options", "my_admin_page_slug", "my_admin_page_func" ); | |
} | |
function my_admin_page_func() { | |
?> | |
<div class="wrap"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GetNumberOfCallbacks( $strHook='' ) { | |
global $wp_filter; | |
if( empty( $strHook ) || !isset( $wp_filter[$strHook] ) ) return; | |
return count( $wp_filter[$strHook] ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( isset( $_POST['login'] ) ) | |
die( '<pre>' . print_r( $_POST, true ) . '</pre>' ) ; | |
?> | |
<html> | |
<body> | |
<form accept-charset="UTF-8" action="" method="post"> | |
<ul class="clear-float"> | |
<li><label for="user_login">Login ID</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$array1 = array( 'a', 'b', 'c' ); | |
$array2 = array( 'd', 'e', ); | |
$result1 = array_merge( $array2, $array1 ); | |
$result2 = array_merge( $array1, $array2 ); | |
echo '<pre>' . print_r( $result1, true ) . '</pre>'; | |
echo '<pre>' . print_r( $result2, true ) . '</pre>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Admin Page Framework - Sample Form Elements | |
Plugin URI: http://en.michaeluno.jp/admin-page-framework | |
Description: Demonstrates adding a form elements for Admin Page Framework v2.0.0 or above. | |
Author: Michael Uno | |
Author URI: http://michaeluno.jp | |
Version: 0.0.1 | |
Requirements: PHP 5.2.4 or above, WordPress 3.2 or above, Admin Page Framework 2.0.0 or above. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Admin Page Framework Tutorial 01 - Create an Admin Page | |
Plugin URI: http://en.michaeluno.jp/admin-page-framework | |
Description: Creates an admin page with Admin Page Framework v3 | |
Author: Michael Uno | |
Author URI: http://michaeluno.jp | |
Version: 1.0.2 | |
Requirements: PHP 5.2.4 or above, WordPress 3.4 or above. Admin Page Framework 3.0.0 or above | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Admin Page Framework Tutorial 02 - Create a Form | |
Plugin URI: http://en.michaeluno.jp/admin-page-framework | |
Description: Creates a form in an admin page with Admin Page Framework v3 | |
Author: Michael Uno | |
Author URI: http://michaeluno.jp | |
Version: 1.0.2 | |
Requirements: PHP 5.2.4 or above, WordPress 3.4 or above. Admin Page Framework 3.1.3 or above | |
*/ |