⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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 | |
/** | |
* WordPress Chosen Taxonomy Metabox | |
* Author: Helen Hou-Sandi | |
* | |
* Use Chosen for a replacement taxonomy metabox in WordPress | |
* Useful for taxonomies that aren't changed much on the fly and are | |
* non-hierarchical in nature, as Chosen is for flat selection only. | |
* You can always use the taxonomy admin screen to add/edit taxonomy terms. | |
* Categories need slightly different treatment from the rest in order to |
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 | |
/* | |
Usage: | |
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
if ( !$frag->output() ) { // NOTE, testing for a return of false | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
// IMPORTANT | |
$frag->store(); | |
// YOU CANNOT FORGET THIS. If you do, the site will break. |
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
# Install SublimeText | |
# ST2 | |
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages | |
# ST3 | |
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages | |
# Install mCSS | |
git clone git://github.com/minimaldesign/mCSS.tmbundle.git "mCSS.tmbundle" |
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_filter( 'hsd_get_user_customer_ids', 'check_hsd_customer_id', 999, 2 ); | |
check_hsd_customer_id( $hsd_ids, $user_id ) { | |
if ( $hsd_ids ) { | |
$now = current_time( 'timestamp' ); | |
$last_sync = get_user_meta( $user_id, 'pp_hsd_last_sync', true ); | |
if ( ! $last_sync || $last_sync <= ( $now - ( HOUR_IN_SECONDS * 6 ) ) ) { |
Note
Hi, everyone. I've been putting in a lot of work on this over the last few weeks months (sob) and i'm currently underemployed! If you'd like to hire me to do CMS-based work (i focus on Craft and ExpressionEngine but i do some WordPress work as well), please reach out! Alternatively, if you'd like to chip in toward bills & groceries, that's a big help right now!