Skip to content

Instantly share code, notes, and snippets.

View jerclarke's full-sized avatar
🌿

Jer Clarke jerclarke

🌿
View GitHub Profile
@jerclarke
jerclarke / gist:576db68a4030a87ed234
Created July 22, 2014 21:47
echor() - Beutified variable/array/object output for debugging
/**
* Beutified variable/array/object output for debugging
*
* Intellegently determines the type of data in $input and
* prints out a pleaseant rendering of its contents.
*
* Distinguishes between arrays, objects, strings, integers and booleans
* Otherwise states its not sure what $input is.
*
* $args is an array of optional parameters:
@jerclarke
jerclarke / Google_OAuth2.php
Last active February 17, 2018 19:40
Google_OAuth2.php from Google Analyticator v.6.4.3 with modifications to fix "Fatal error: Uncaught exception 'Google_AuthException'" See revision history for details on what I changed to fix the error. See this wordpress.org support forum posting about the issue: http://wordpress.org/support/topic/solution-for-fatal-error-uncaught-exception-goo…
<?php
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@jerclarke
jerclarke / google-analyticator.php
Last active December 12, 2015 04:59
Google Analyticator (WordPress Plugin) v6.4.2 main file. Patched to fix saving of array-based settings for roles-that-see-dashboard-widget and roles-excluded-from-tracking. See "Revisions" to see what I changed. NOTE: I edited the plugin version and description to reflect that this is a patched version. You should see the update notice when a ne…
<?php
/*
* Plugin Name: Google Analyticator
* Version: 6.4.2.1.jer
* Plugin URI: http://wordpress.org/extend/plugins/google-analyticator/
* Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin you need to authenticate with Google, then select your domain and you're set. PATCHED_BY_JEREMY_CLARKE: Fixed issue with array-based options (roles to hide, roles to see dashboard widget) being stomped by overzealous kses filtering.
* Author: Video User Manuals
* Author URI: http://www.videousermanuals.com
* Text Domain: google-analyticator
*/
@jerclarke
jerclarke / gist:1725905
Created February 2, 2012 21:32
Patch to fix checkbox display in Custom Metadata Manager WordPress Plugin
Index: custom_metadata.php
===================================================================
--- custom_metadata.php (revision 499358)
+++ custom_metadata.php (working copy)
@@ -871,12 +871,22 @@
else $field_id = $field_slug;
$readonly_str = ($field->readonly) ? 'readonly="readonly" ' : '';
+