Skip to content

Instantly share code, notes, and snippets.

J.D. Grimes JDGrimes

Block or report user

Report or block JDGrimes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JDGrimes
JDGrimes / wp-spamshield-bypass-for-edd-sl.php
Created May 26, 2017
Bypasses WP-SpamShield blocking for Easy Digital Downloads Software Licenses requests.
View wp-spamshield-bypass-for-edd-sl.php
<?php
/**
* Plugin Name: WP-SpamShield Bypass for EDD SL
* Author: J.D. Grimes
* Author URI: https://codesymphony.co/
* Plugin URI: https://codesymphony.co/
* Version: 1.0.0
* License: GPLv2+
* Description: Bypasses WP-SpamShield blocking for Easy Digital Downloads Software Licenses requests.
@JDGrimes
JDGrimes / wp-time-test.php
Last active Mar 31, 2017
Tests different methods of timezone handling in WordPress.
View wp-time-test.php
<?php
class WP_Time_Test extends WP_UnitTestCase {
public function test_strtotime() {
$offset = -5;
update_option( 'gmt_offset', $offset );
update_option( 'timezone_string', 'America/New_York' );
@JDGrimes
JDGrimes / ExpectedSlashed.php
Created Sep 13, 2016
WIP PHPCS sniff for functions that expect slashed data in WordPress
View ExpectedSlashed.php
<?php
/**
* Sniff for data that is expected to be slashed.
*
* Some WordPress core functions expect the data passed to them to be slashed, for
* legacy reasons.
*
* @package WordPress-Coding-Standards
* @since 0.10.0
*/
View gist:442cfdbcc9710043a369e4cef5b60c26
/**
* Test that points hooks that don't auto-reverse don't refire after import.
*
* @since 1.0.0
*/
public function test_imported_non_auto_reversing_hook_does_not_refire() {
$legacy_slug = 'comment';
$settings = array(
@JDGrimes
JDGrimes / testcase.php
Created Jun 16, 2015
backup globals whitelist for PHPUnit test case
View testcase.php
/**
* A list of global variables to back up.
*
* @since 2.0.0
*
* @var string|string[]
*/
protected $backup_globals;
@JDGrimes
JDGrimes / class-wordpoints-module.php
Created May 30, 2015
Module API that never happened
View class-wordpoints-module.php
<?php
/**
* Class to provide a bootstrap for modules.
*
* @package WordPoints
* @since 1.10.0
*/
/**
View gist:809f180d7f3893901641
<?php
// Can be called whenever.
function add_admin_notice( $code, $message, $type = 'error' ) {
global $wp_admin_notices;
if ( ! isset( $wp_admin_notices ) )
$wp_admin_notices = array();
$wp_admin_notices[] = array(
@JDGrimes
JDGrimes / jds-dev-tools.php
Created Apr 4, 2014
My development tools
View jds-dev-tools.php
<?php
/**
* Plugin Name: J.D.'s Dev Tools
* Version: 0.9.9-beta-5
* Description: My development tools.
* Author: J.D. Grimes
* Author URI: http://codesymphony.co/
*/
@JDGrimes
JDGrimes / debug-hooks.php
Created Feb 15, 2014
WordPress plugin providing some functions to debug actions and filters.
View debug-hooks.php
<?php
/**
* Plugin Name: Debug Hooks
* Author: J.D. Grimes & Some other guy on the net
* Version: $ver$
* Description: Adds some functions you can use to debug actions and filters.
*/
/**
View page_link.php
You can’t perform that action at this time.