Set options for all the blogs on a WordPress Multisite installation
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 | |
if(!is_404()) { | |
// Set caching headers (cache for 5 minutes) | |
header('Cache-Control: max-age=300, must-revalidate'); | |
header('Expires: '.gmdate('D, d M Y H:i:s', strtotime('+5 minutes')).' GMT'); | |
} |
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
# This sets the highlight colour based upon whether you're remote or local. | |
export PS1="\[${HC}\033]0;\u@\h: \w\[\007\]\[${cyan}\]\u\[${HC}\]@\h: \w \[${cyan}\]\$ \[${NC}\]" |
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
.PHONY: install | |
install: clean wordpress | |
git submodule init; | |
@echo "\n\nNOTICE: You may need to configure a MySQL database for your Wordpress installation. Just run:" | |
@echo " mysql -u root -p;" | |
@echo " CREATE DATABASE example_site; \n" | |
wordpress: latest.tar.gz | |
tar -zxvf latest.tar.gz; |
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 | |
if (class_exists('WpeCommon')){ | |
$wpe_common = new WpeCommon(); | |
$cdn_url = $wpe_common->get_cdn_domain($wpe_netdna_domains,get_bloginfo( 'url' ) ); | |
} |
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
time curl http://www.wikipedia.org > /dev/null |
Prepared by Paul Wenzel with data from Google Analytics and the Google API console
Complete site overhaul launched in Spring 2014.
Traffic increased and bounce rate decreased.
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 | |
/** | |
* @link Escape post content in META Attributes, http://codex.wordpress.org/Data_Validation | |
* @link Complete List of HTML Meta Tags, https://gist.github.com/kevinSuttle/1997924 | |
* @example get_template_part('meta'); | |
*/ | |
?> | |
<meta name="twitter:card" content="summary"> | |
<!--<meta name="twitter:site" content="@YOUR_TWITTER_HANDLE">--> |
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
<script type="text/javascript"> | |
// Track 404 errors with Universal Analytics | |
if($('body').hasClass('error404')) { | |
ga('send', 'event', 'error', '404', 'page: ' + document.location.pathname + document.location.search + ' ref: ' + document.referrer, {'nonInteraction': 1}); | |
} | |
</script> |