Skip to content

Instantly share code, notes, and snippets.

View vicchi's full-sized avatar

Gary Gale vicchi

View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Mapstraction Text - Microsoft v7</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script src="http://code.jquery.com/jquery-1.8.2.min.js" type="text/javascript"></script>
<script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
<script src="https://raw.github.com/mapstraction/mxn/release-2.1/source/mxn.js?(microsoft7)" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" media="all" href="css/examples.css">
<style type="text/css">
@vicchi
vicchi / wp-login-security-2-fix.php
Created March 12, 2013 12:12
Workaround for the WP Login Security 2 plugin issuing "session_start(): Cannot send session cache limiter" warnings where the PHP display_errors ini setting can't be changed.
<?php
function wpls2_new_ip_check() {
$error_status = ini_get('display_errors');
if ($error_status === '1') {
ini_set('display_errors', '0');
}
global $wpls2_options, $current_user;
session_start();
$known = get_option( $wpls2_options['whitelist'] );
@vicchi
vicchi / wp-biographia-mailto-subject-filter.php
Created February 25, 2013 09:43
Example of the WP Biographia WordPress plugin's wp_biographia_link_item filter; appends the current post's title to the Biography Box's mailto link. Copy and paste this code into the bottom of your theme's functions.php.
add_filter ('wp_biographia_link_item', 'filter_link_item', 10, 2);
function filter_link_item ($content, $params) {
// $params = array (
// 'type' => 'link type (icon|text)',
// 'format' => 'link format string',
// 'meta' => 'additional anchor attributes',
// 'title' => 'link title',
// 'url' => 'link URL',
// 'body' => 'link body text',
// 'link-class' => 'link CSS class name',
@vicchi
vicchi / avatars.php.diff
Created November 8, 2012 13:54
Add Local Avatars - get_avatar filter patch for avatars.php
1295,1296c1295
< $alt = 'avatar';
<
---
>
1401c1400
< $avatar = "<img src='{$src}' class='{$class} avatar-{$size} avatar-default' height='{$size}' width='{$size}' style='width: {$size}px; height: {$size}px;' alt='{$alt}' />";
---
> $avatar = "<img src='{$src}' class='{$class} avatar-{$size} avatar-default' height='{$size}' width='{$size}' style='width: {$size}px; height: {$size}px;' alt='avatar' />";
1413c1412
@vicchi
vicchi / wp-biographia-widget-debug.php
Created October 13, 2012 08:45
WP Biographia Widget - Debug Version - For v3.2.1 Only
<?php
// WP Biographia Widget
// COMPATIBLE WITH v3.2.1 ONLY - DO NOT USE IN A PRODUCTION ENVIRONMENT
class WP_BiographiaWidget extends WP_Widget {
static $name_options;
private $widget_sem = false;
@vicchi
vicchi / lib.php.diff
Created September 25, 2012 07:44
Easy Heads Up Bar - lib.php.diff
70c70
< $xtra = " AND show_where != 'interior'";
---
> $xtra .= " AND show_where != 'interior'";
72c72
< $xtra = " AND show_where != 'home'";
---
> $xtra .= " AND show_where != 'home'";
180,182d179
@vicchi
vicchi / easy-heads-up-bar.php.diff
Created September 25, 2012 07:43
Easy Heads Up Bar - easy-heads-up-bar.php.diff
58c58
< define( 'EHU_WEB_URL', $ehu_the_web_url );
---
> define( 'EHU_WEB_URL', $ehu_the_web_add );
@vicchi
vicchi / easy-heads-up-bar.diff
Created September 19, 2012 08:49
Easy Heads Up Bar - easy-heads-up-bar.diff
58c58
< define( 'EHU_WEB_URL', $ehu_the_web_url );
---
> define( 'EHU_WEB_URL', $ehu_the_web_add );
@vicchi
vicchi / lib.php.diff
Created September 19, 2012 08:48
Easy Heads Up Bar - lib.php.diff
68c68
< $xtra = '';
---
>
180,181d179
< global $pagenow;
<
191,192c189,190
< //$page = $_GET['page'];
< $ehu_page = explode("_", $pagenow);
@vicchi
vicchi / gist:3059546
Created July 6, 2012 11:04
Better Plugin Compatibility Control - Hacked
<?php
/**
* The main plugin file
*
* @package WordPress_Plugins
* @subpackage BetterPluginCompatibilityControl
*/
/*
Plugin Name: Better Plugin Compatibility Control