Skip to content

Instantly share code, notes, and snippets.

@michaeluno
michaeluno / AdminPage.php
Created Jan 30, 2022
This is a WordPress plugin that demonstrates custom collapsible sortable sections with Admin Page Framework.
View AdminPage.php
<?php
namespace AdminPageFrameworkCustomSortableSections;
class AdminPage extends \AdminPageFramework {
public $sPageSlug = 'apf_custom_sortable_collapsible_sections';
public function setUp() {
@michaeluno
michaeluno / AdminPage.php
Created Jan 7, 2022
This is a WordPress plugin that demonstrates how dynamic CSV data are downloaded using the export button with Admin Page Framework.
View AdminPage.php
<?php
namespace AdminPageFrameworkCSVDownload;
class AdminPage extends \AdminPageFramework {
public function setUp() {
$this->setRootMenuPage( 'Settings' );
@michaeluno
michaeluno / amazon-auto-links-prop-products-without-price.php
Last active Aug 6, 2021
An Amazon Auto Links extension plugin of WordPress that drops products if they don't have price information.
View amazon-auto-links-prop-products-without-price.php
@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() {