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: DB Sub-Comannd Test | |
* Description: Demonstrate problem creating a sub-command of `wp db`. | |
* Version: 0.1.0 | |
* Author: Paul V. Biron/Sparrow Hawk Computing | |
* Author URI: http://sparrowhawkcomputing.com/ | |
* | |
* This simple plugin demonstrates a problem I'm having creating a sub-command |
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
From 0f3fe93e4c7b82cf625e30b49db7b43ea1b46704 Mon Sep 17 00:00:00 2001 | |
From: Paul Biron <[email protected]> | |
Date: Sun, 12 Sep 2021 15:53:13 -0600 | |
Subject: [PATCH] Fix bug that causes subsequent repeats of date fields that | |
use a datepicker from showing the jQuery datepicker. | |
--- | |
js/gravityforms.js | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) |
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: Disable plugin/theme auto-update email notficiations | |
* Description: Disable plugin/theme auto-update email notficiations | |
* Author: Paul V. Biron/Sparrow Hawk Computing | |
* Author URI: https://sparrowhawkcomputing.com/ | |
* Plugin URI: https://gist.github.com/pbiron/ec0d7d0bf84308c905acaf8900764aec | |
* Version: 0.1.0 | |
* License: GPLv2 or later |
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: Enable/Disable plugins when doing local dev | |
Plugin URL: https://gist.github.com/pbiron/52bb63042cf220256ece89bc07fb57b0 | |
Description: If the WP_LOCAL_DEV constant is true, enables/disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Paul V. Biron/Sparrow Hawk Computing | |
Author URI: https://sparrowhawkcomputing.com | |
*/ |
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 | |
/** | |
* Admin ajax functions to be tested | |
*/ | |
require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' ); | |
/** | |
* Testing `_wp_attachment_backup_sizes` meta for ajax media editing | |
* | |
* Does NOT test that the edits made are correct |
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 | |
/* | |
* full version of code I added in a comment on wpscholar.com about how | |
* make it easier for WP to produce responsive images | |
* @link https://wpscholar.com/blog/remove-wp-image-size-attributes/#comment-23731 | |
* | |
* Note: I make no claims that this handles all cases, just those problems | |
* identified by others commenting on the OP's code | |
*/ |
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 ( version_compare( get_bloginfo( 'version' ), '4.2', '>=') ) : | |
/* | |
* WP 4.0 introduced attachment_url_to_postid(). However, it fails when the | |
* URL is for an intermediate sized image (e.g., `.../filename-150x150.jpg`). | |
* | |
* WP 4.2.0 introduced the attachment_url_to_postid filter. The filter func | |
* defined below hooks into that filter and attempts remedy that limitation. | |
*/ | |
add_filter( 'attachment_url_to_postid' , 'shc_attachment_url_to_postid_filter', 10, 2 ); |
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 | |
require_once dirname( __FILE__ ) . '/base.php'; | |
// the path on this to the main export code in the export redux plugin | |
// if/when testing the export in core, modify this path | |
require_once __DIR__ . '/../includes/export.php'; | |
/** | |
* @group export | |
*/ |
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 | |
abstract class WXR_Export_UnitTestCase extends WP_UnitTestCase { | |
protected function _export_wp( $args ) { | |
ob_start(); | |
export_wp( $args ); | |
$wxr = ob_get_contents(); | |
ob_end_clean(); |