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
# 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
<?php | |
function get_the_current_url() { | |
$protocol = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"); | |
$base_url = $protocol . "://" . $_SERVER['HTTP_HOST']; | |
$complete_url = $base_url . $_SERVER["REQUEST_URI"]; | |
return $complete_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
<?php | |
/* Faux Google Maps oEmbed | |
* Embed google maps in a nicer iframe without using their provided embed code | |
* @usage Paste a Google Maps link in your post and it will be replaced with an iframe when published | |
* @link http://bigsaturday.net/oembed-google-maps-wordpress/ | |
*/ | |
wp_embed_register_handler( 'google_map', '#https://maps\.google\.com/maps(.*)#i', 'embed_google_map' ); | |
function embed_google_map( $matches ) { | |
$query = parse_url($matches[0]); |
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
<!-- OAS SETUP begin --> | |
<script language="javascript" type="text/javascript"> | |
<!--//configuration | |
OAS_url = 'http://oascentral.publicradio.org/RealMedia/ads/'; | |
OAS_sitepage = window.location.hostname + window.location.pathname; | |
OAS_listpos = 'TopRight,BottomRight,Right3'; | |
OAS_query = ''; | |
OAS_target = '_top'; | |
//end of configuration |
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> | |
dataLayer = [{ | |
'Error': '404' | |
}]; | |
</script> | |
<!-- Google Tag Manager --> | |
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-XXXX..."></iframe></noscript> | |
<script>...</script> | |
<!-- End Google Tag Manager --> |
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
/* Initialize Google Publisher Tags API - Docs: http://goo.gl/ZqOiy */ | |
var gptadslots=[]; | |
var googletag = googletag || {}; | |
googletag.cmd = googletag.cmd || []; | |
(function(){ var gads = document.createElement('script'); | |
gads.async = true; gads.type = 'text/javascript'; | |
var useSSL = 'https:' == document.location.protocol; | |
gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js'; | |
var node = document.getElementsByTagName('script')[0]; | |
node.parentNode.insertBefore(gads, node); |