Skip to content

Instantly share code, notes, and snippets.

View vicchi's full-sized avatar

Gary Gale vicchi

View GitHub Profile
@vicchi
vicchi / wp-biographia-user-register.php
Created May 2, 2012 20:36
WP Biographia user_register Hook
<?php
add_action( 'user_register', 'wpb_admin_user_register' );
function wpb_admin_user_register ($user_id) {
$res = fopen ('/tmp/logger.log', 'a+');
global $__wp_biographia_instance;
$i = $__wp_biographia_instance;
fwrite ($res, 'admin_user_register: user id ' . $user_id . "\n");
@vicchi
vicchi / wp-biographia-shortcode-samples.php
Created May 3, 2012 16:07
Using do_shortcode in a WordPress template to show WP Biographia's Biography Box
<?php
// Display the Biography Box for the current user ...
echo do_shortcode ('[wp_biographia]');
// Get the username of the currently logged in user ...
global $user_login;
get_currentuserinfo ();
// Within the WordPress loop get the username of the user whose post/page is current ...
@vicchi
vicchi / wp-biographia-avatar.css
Created May 8, 2012 05:24
WP Biographia Avatar CSS for Organic Themes - News Theme
// for @theKyleNofuente
// The Organic Themes - News Theme defines .avatar as this
.avatar {
background: whiteSmoke;
border: 1px solid #DDD;
margin: 10px 10px 10px 10px 0px;
padding: 4px;
}
@vicchi
vicchi / wordpress-loop-widget.php
Created May 9, 2012 07:58
WordPress Loop Processing Widget Proof Of Concept
<?php
class WPPluginTemplateWidget extends WP_Widget {
function __construct () {
$widget_ops = array (
'description' => __('Template Test Widget')
);
parent::WP_Widget ('WPPluginTemplateWidget', __('WP Plugin Template'), $widget_ops);
}
@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
@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 / 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 / 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 / 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 / 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;