This is a list of the SublimeText 2 addons I use for my development environment.
This file contains 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
#!/bin/sh | |
dbname=wpsample | |
dbuser=root | |
dbhost=127.0.0.1 | |
dbpass=password | |
wphost=localhost | |
wptitle="wp-cli sample site." | |
wpadmin_name="dontadmin" | |
wpadmin_email="mail@example.com" |
This file contains 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 | |
/* | |
Plugin Name: Heartbeat Comment Update | |
Description: Updates Comment Count on Dashboard with Heartbeat. | |
Author: Andrew Ozz, Mike Schroder | |
Version: 0.2 | |
Author URI: http://www.getsource.net | |
*/ | |
add_filter( 'heartbeat_received', 'wc_heartbeat_comment_count', 10, 3 ); |
This file contains 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 | |
/* | |
* Background Caching with Transients | |
* Using BBC News API as an example | |
*/ | |
function pb_get_news() { | |
/* | |
* Get transient and if expired refresh data immediately |
This file contains 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 pb_get_news() { | |
/* | |
* Get transient and if expired refresh data immediately | |
*/ | |
if ( false === ( $news = get_transient( 'pb_bbc_news' ) ) ) { | |
// Uses BBC News API to fetch new data |
These are the default titles & descriptions I use when using the Local SEO plugin. Note this is only available and used when doing multiple locations.
#####Yoast Local SEO CPT (Default CPT Name is Locations)
Title: %%title%% %%sep%% %%cf__wpseo_business_address%% %%cf__wpseo_business_city%%, %%cf__wpseo_business_state%%
%%cf__wpseo_business_zipcode%% %%cf__wpseo_business_country%% %%sep%% %%pt_single%% %%sep%% %%sitename%%
Description: %%excerpt%%
#####Yoast Local SEO CPT Archive Page (Default CPT Name is Locations)
This file contains 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( 'jetpack_get_available_modules', 'prefix_hide_jetpack_modules' ); | |
/** | |
* Disable all non-whitelisted jetpack modules. | |
* | |
* As it's written, this will allow all of the currently available Jetpack | |
* modules to work display and be activated normally. | |
* | |
* If there's a module you'd like to disable, simply comment it out or remove it | |
* from the whitelist and it will no longer be available for activation. |
This file contains 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
REMOTE_REPOSITORY=${REMOTE_REPOSITORY:?'You need to configure the REMOTE_REPOSITORY environment variable!'} | |
REMOTE_BRANCH=${REMOTE_BRANCH:?'You need to configure the REMOTE_BRANCH environment variable!'} | |
set -e | |
git fetch --unshallow || true | |
git push ${REMOTE_REPOSITORY} ${CI_COMMIT_ID}:${REMOTE_BRANCH} | |
cd wp-content/themes/<theme> | |
npm install -g bower gulp | |
npm install | |
bower install | |
gulp --production |
This file contains 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
""" | |
quick script put together to scrape zillow listing data | |
at the very least it functions so you don't need to go back and forth to calculate commute times | |
very messy... maybe i'll revisit this someday | |
""" | |
import requests | |
import re | |
import csv |
This file contains 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 | |
wp_oembed_add_provider( 'http://*.houzz.com/*', 'http://www.houzz.com/oembed' ); | |
function do_houzz_shortcode($atts, $content=null) { | |
$url = substr( $atts[0], 1 ); | |
$args = array(); | |
if ( isset( $atts['w'] ) && is_numeric( $atts['w'] ) ) { | |
$args['width'] = $atts['w']; | |
} |
OlderNewer