Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Uno michaeluno

View GitHub Profile
@michaeluno
michaeluno / amazon-auto-links-remove-parentheses-in-price-outputs.php
Last active Nov 16, 2020
An Amazon Auto Links, a WordPress plugin, extension plugin that removes a part enclosed in parentheses in price outputs.
View amazon-auto-links-remove-parentheses-in-price-outputs.php
@michaeluno
michaeluno / admin-page-framework-demo-supress-options.php
Last active Sep 25, 2020
Demonstrates how to suppress the options in Admin Page Framework. ( this requires v3.1.0 or above)
View admin-page-framework-demo-supress-options.php
<?php
/*
* Plugin Name: Admin Page Framework Demo - Suppress Options
* Description: Demonstrates how to suppress the options in Admin Page Framework.
* Author: Michael Uno
* Author URI: http://michaeluno.jp
* Version: 1.1.0
* Requirement: Admin Page Framework v3.1.0 or higher.
*/
@michaeluno
michaeluno / admin-page-framework-demo-default-options.php
Last active Sep 25, 2020
Demonstrates how to set default options with the options_{instantiated class name} hook in Admin Page Framework
View admin-page-framework-demo-default-options.php
<?php
/*
* Plugin Name: Admin Page Framework Demo - Default Option Values
* Description: Demonstrates how to set default options with the options_{instantiated class name} hook in Admin Page Framework
* Author: Michael Uno
* Author URI: http://michaeluno.jp
* Version: 1.0.1
* Requirement: Admin Page Framework v3.1.0 or higher.
*/
@michaeluno
michaeluno / example.php
Last active Jan 21, 2020
A custom function that beautifies PHP print_r() outputs.
View example.php
<?php
class A {
public function test() {}
}
$_func = function( $f ) use ( $p ) {};
$_resource = fopen( __DIR__ . '_temp.txt', 'w' );
$_oA = new A;
$_sMultiLine =<<<HERE
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
@michaeluno
michaeluno / task-scheduler-hung-routine-cleaner.php
Created Jun 16, 2017
Cleans up hung routines of Task Scheduler WordPress plugin.
View task-scheduler-hung-routine-cleaner.php
<?php
/**
* Plugin Name: Task Scheduler - Hung Routine Cleaner
* Description: Cleans up hung routines.
* Author: Michael Uno
* Version: 1.0.0
*/
class TaskSchedulerHungRoutineCleaner {
@michaeluno
michaeluno / amazon-auto-links-product-link-to-smile.php
Created Jul 26, 2018
Converts product links to the Amazon Smile domain, generated by the Amazon Auto Links WordPress plugin.
View amazon-auto-links-product-link-to-smile.php
@michaeluno
michaeluno / admin-page-framework-import-csv.php
Last active Feb 2, 2018
Demonstrates the use of the import field with Admin Page Framework v2.
View admin-page-framework-import-csv.php
<?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.
*/
@michaeluno
michaeluno / amazon-auto-links-custom-rss-field.php
Created Jan 3, 2018
Adds a custom image url field in RSS2 output of Amazon Auto Links (WordPress plugin) product RSS2 feeds.
View amazon-auto-links-custom-rss-field.php
@michaeluno
michaeluno / task-scheduler-sample-action.php
Created May 12, 2015
A custom action plugin of the Task Scheduler WordPress plugin.
View task-scheduler-sample-action.php
<?php
/**
* Plugin Name: Task Scheduler - Sample Action
* Plugin URI: http://en.michaeluno.jp/
* Description: Uses a custom action with Task Scheduler.
* 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
*/