This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Recursively sort an array of taxonomy terms hierarchically. Child categories will be | |
* placed under a 'children' member of their parent term. | |
* | |
* @param Array $cats taxonomy term objects to sort | |
* @param Array $into result array to put them in | |
* @param integer $parentId the current parent ID to put them in | |
*/ | |
function sortHierarchicalTaxonomy(Array $cats, Array &$into, $parentId = 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('add_meta_boxes', array('AdminBoxShuffle', 'repositionDefaultMetaboxes'), 0); | |
class AdminBoxShuffle | |
{ | |
const EXCERPT_HINTTEXT = 'This excerpt is shown at the top of your posts and will form the preview text on gateway pages.'; | |
/** | |
* Reposition default metaboxes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wpe_noRedirectUrl($srcURL) | |
{ | |
if (class_exists('WpeCommon')) { | |
global $wpe_netdna_domains; | |
static $cdn_domain; | |
if (!isset($cdn_domain)) { | |
$wpe_common = new WpeCommon(); | |
if ($wpe_common->is_cdn_enabled()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#publishing-action') | |
.find('.spinner').hide().end() | |
.find('#publish').removeClass('button-primary-disabled'); | |
$('#save-action') | |
.find('.spinner').hide().end() | |
.find('#save-post').removeClass('button-disabled'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
var WATCH_FOCUS_ON = $(); | |
$.event.special['clickoutside'] = { | |
setup: function() | |
{ | |
WATCH_FOCUS_ON = WATCH_FOCUS_ON.add( this ); | |
// bind document handler if this is the first guy being bound |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CharsetConverter | |
{ | |
private static $WORD_CHARS_MAP = array( | |
"\xE2\x80\x9A" => "‚", | |
"\xE2\x80\x9E" => "„", | |
"\xE2\x80\x98" => "'", | |
"\xE2\x80\x99" => "'", | |
"\xE2\x80\x9C" => "\"", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A jquery plugin wrapper for a pure JavaScript class | |
* | |
* This will automatically give us the following: | |
* | |
* - a constructor for our class using $('my.selector').myClass() | |
* - automatic method access to the class's instance functions via syntax | |
* $('my.selector').myClass('funcName', arg1, arg2, ...argN); | |
* - automatic property access of all the class's internal properties. Both this | |
* and the above can assist greatly with third-party code integration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* usage: date/time date/time ms->sec->min->hour->day | |
* getPeriodBetween('1 Jul 2011', '26 Oct 2010', 1000 * 60 * 60 * 24); | |
* | |
* = number of days between these two dates | |
*/ | |
function getPeriodBetween(date1, date2, timescale) | |
{ | |
return (new Date(date1) - new Date(date2)) / (timescale); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::-webkit-input-placeholder { /* WebKit browsers */ | |
color: #F00; | |
opacity: 1; | |
} | |
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ | |
color: #F00; | |
opacity: 1; | |
} | |
::-moz-placeholder { /* Mozilla Firefox 19+ */ | |
color: #F00; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@BASE_FONT_SIZE = 16; | |
@BASE_LINE_HEIGHT = 1.5; | |
// consistent base font size & line height (16px) | |
html { | |
font-size: 100%; | |
*font-size: 16px; | |
line-height: @BASE_LINE_HEIGHT; | |
} |
OlderNewer