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 / 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 / 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 / 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 / APFTest_SortableCheckboxes.php
Created Jul 21, 2017
Demonstrates sortable set of checkboxes with different labels in Admin Page Framework.
View APFTest_SortableCheckboxes.php
<?php
class APFTest_SortableCheckboxes extends AdminPageFramework {
public function setUp() {
// To reset the options uncomment the next line.
// delete_option( get_class( $this ) );
$this->setRootMenuPage( __( 'Sortable Checkboxes', 'apf-test-sortable-checkboxes' ) );
@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 / fetch-tweets-modify-count.php
Created Dec 7, 2016
A WordPress plugin that modifies the `count` parameter value of the API request query string made by the Fetch Tweets plugin.
View fetch-tweets-modify-count.php
<?php
/**
* Plugin Name: Fetch Tweets - Modify Count
* Description: Modifies the `count` parameter value of the API request query string.
* Version: 0.0.1
*/
class FetchTweetsModifyCount {
public function __construct() {
@michaeluno
michaeluno / AdminPageFramework_FormBeta_frontend.php
Last active Nov 28, 2016
Demonstrates front-end forms using Admin Page Framework.
View AdminPageFramework_FormBeta_frontend.php
<?php
class AdminPageFramework_FormBeta_frontend extends AdminPageFramework_Form {
/**
* Stores sub-object class names.
*
*
* @since 3.8.11
@michaeluno
michaeluno / fetch-tweets-delete-options
Created Oct 1, 2016
Deletes options of the Fetch Tweets plugin of WordPress.
View fetch-tweets-delete-options
<?php
/**
* Plugin Name: Fetch Tweets - Delete Options
* Plugin URI: http://en.michaeluno.jp/fetch-tweets
* Description: Deletes options of the Fetch Tweets plugin.
* Author: Michael Uno
* Author URI: http://michaeluno.jp
* Version: 1.0.0
*/
@michaeluno
michaeluno / admin-page-framework-add-a-main-menu.php
Last active Sep 5, 2016
Demonstrates how to add sub-menu pages from a separate plugin.
View admin-page-framework-add-a-main-menu.php
<?php
/**
* Plugin Name: Admin Page Framework Demo - Add a Main Menu
* Plugin URI: http://en.michaeluno.jp/admin-page-framework
* Description: Adds a main menu and a sub-menu page.
* Author: Michael Uno
* Author URI: http://michaeluno.jp
* Version: 1.0.0
*
*/