Skip to content

Instantly share code, notes, and snippets.

View matthewpizza's full-sized avatar
🌸
°˖✧◝(◠ᴥ◠)◜✧˖°

matthewpizza

🌸
°˖✧◝(◠ᴥ◠)◜✧˖°
View GitHub Profile
<?php
/*
Edited March 2010 to include blog ID.
See in action here http://existentialmedia.org/blogs/
Sample call from Blogname
<?php $org_blog_id = get_post_meta ($post-> ID, 'blogid', true); $blog_details = get_blog_details($org_blog_id); echo $blog_details->blogname; ?>
*/
/*
Plugin Name: WordPress MU Sitewide Tags Pages
Plugin URI: http://ocaoimh.ie/wordpress-mu-sitewide-tags/
@matthewpizza
matthewpizza / AdBlock filters
Created December 31, 2010 02:56
Trying to do the right thing
meebo.com
##div#meebo.meebo-00
@@.deckAd
@@.deckads
@@||decknetwork.net^$third-party
@@daringfireball.net
@@instapaper.com
@@fusionad
@@fusionads.net^$third-party
@@yoggrt
@matthewpizza
matthewpizza / gist:1336902
Created November 3, 2011 16:10
WebKit Keyframes
/* This: */
@-webkit-keyframes show {
from { top: -300px; }
to { top: 0; }
}
/* Or this: */
@-webkit-keyframes show {
0% { top: -300px; }
1% { top: -297px; }
2% { top: -294px; }
* {
font-family: Helvetica Neue;
}
#gb,
#top-bar,
#lhn-add-subscription-section,
#scrollable-sections-bottom-shadow,
#scrollable-sections-top-shadow,
#viewer-header-container,
#meebo,
#addthis,
.shareaholic-show-on-load,
.shareaholic-like-buttonset,
.fb_iframe_widget,
iframe[title*="+1"],
button.esw,
#shareLinks,
.share-wrap,
.lazy-share-widget,
<?php
// From: http://css-tricks.com/snippets/php/truncate-string-in-center/
$longString = 'abcdefghijklmnopqrstuvwxyz0123456789z.jpg';
$separator = '/.../';
$separatorlength = strlen($separator) ;
$maxlength = 25 - $separatorlength;
$start = $maxlength / 2 ;
$trunc = strlen($longString) - $maxlength;
<h3>All Post Meta</h3>
<?php $getPostCustom=get_post_custom(); // Get all the data ?>
<?php
foreach($getPostCustom as $name=>$value) {
echo "<strong>".$name."</strong>"." => ";
foreach($value as $nameAr=>$valueAr) {
<?php
// List Hooks (useful for optimizing) list_hooked_functions('wp_head');
function list_hooked_functions($tag=false){
global $wp_filter;
if ($tag) {
$hook[$tag]=$wp_filter[$tag];
if (!is_array($hook[$tag])) {
trigger_error("Nothing found for '$tag' hook", E_USER_WARNING);
return;
{
"caret_style": "phase",
"color_scheme": "Packages/Theme - Aqua/Color Schemes/Espresso Aqua.tmTheme",
"dictionary": "Packages/Language - English/en_US.dic",
"font_size": 15.0,
"ignored_packages":
[
"Vintage"
],
"line_padding_top": 4,