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 - Import CSV | |
Plugin URI: http://en.michaeluno.jp/admin-page-framework | |
Description: Demonstrates the use of the import field. | |
Author: Michael Uno | |
Author URI: http://michaeluno.jp | |
Version: 0.0.2 | |
Requirements: PHP 5.2.4 or above, WordPress 3.3 or above. Admin Page Framework v2.1.7b 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 | |
if ( isset( $_POST['save'] ) ) | |
die( '<pre>' . print_r( $_POST, true ) . '</pre>' ); | |
?> | |
<html> | |
<body> | |
<form accept-charset="UTF-8" action="" method="post"> | |
<select name="single_select" size="1" > | |
<option value="apple">Apple</option> |
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($) { | |
$.Gridster.generate_stylesheet = function(opts) { | |
var styles = ''; | |
var max_size_x = this.options.max_size_x || this.cols; | |
var max_rows = 0; | |
var max_cols = 0; | |
var i; | |
var rules; | |
opts || (opts = {}); |
OlderNewer