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 custom_site_url( $url ) { | |
if( is_admin() ) { | |
return $url; | |
} // you probably don't want this in admin side | |
$replaced = array("buzzed", "blogspot."); | |
foreach ($replaced as $replace) { | |
if (strpos( parse_url($url, PHP_URL_HOST), $replace ) !== false) { | |
return str_replace($replaced, "", $url); |
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
add_action( 'admin_head-post.php', '_my_reset_image_insert_settings' ); | |
add_action( 'admin_head-post-new.php', '_my_reset_image_insert_settings' ); | |
function _my_reset_image_insert_settings() { | |
?> | |
<script> | |
if ( typeof setUserSetting !== 'undefined' ) { | |
setUserSetting( 'align', 'none' ); // none || left || center || right | |
setUserSetting( 'imgsize', 'medium' ); // thumbnail || medium || large || full | |
setUserSetting( 'urlbutton', 'none' ); // none || file || post | |
} |
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 | |
// include this file in your root index.php file to load before Wordpress loads. | |
// | |
// Related Gists: | |
// CSV template: https://gist.github.com/jordanmaslyn/94d450814d921420408a | |
// Plugin code: https://gist.github.com/jordanmaslyn/fbbcc571e6717e66b880 | |
// | |
// Make sure to replace THEME_NAME with your theme's actual name in the line below. |
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 | |
// include this in your theme's functions.php file | |
// Find & Replace all instances of 'prefix' and replace with the brand name. | |
// the file itself expects to be in /wp-content/themes/prefix/functions/modules/ | |
add_action( 'admin_menu', 'prefix_redirects_admin_menu' ); | |
function prefix_redirects_admin_menu() { | |
add_menu_page( |
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
/culture | /about-us/ | |
---|---|---|
/culture/team | /about-us/team/ | |
/culture/careers | /about-us/careers/ | |
/culture/awards | /about-us/awards/ | |
/About | /about-us/ | |
/about | /about-us/ |
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 | |
// include this file in your root index.php before any Wordpress files start getting pulled in. | |
// allow us to force garbage collection (for performance) | |
// commented out for now because it should be enabled by default. Going to test without it first. | |
// gc_enable(); // PHP >= 5.3.0 | |
// old_path => new_path | |
// make sure all of your old_paths have no trailing slash |
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
# /wp-content/uploads/.htaccess | |
# Attempt to load files from production if they're not in our local version | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule (.*) http://www.LIVESITEURL.TLD/wp-content/uploads/$1 | |
</IfModule> |
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
# Directives to send expires headers and turn off 404 error logging. | |
location ~* \.(js|css|png|jpe?g|gif|ico|svg)$ { | |
expires 24h; | |
log_not_found off; | |
try_files $uri $uri/ @production; | |
} | |
location @production { | |
resolver 8.8.8.8; | |
proxy_pass http://www.WEBSITEURL.TLD/$uri; |
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
# Shell prompt based on the Solarized Dark theme. | |
# Screenshot: http://i.imgur.com/EkEtphC.png | |
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles | |
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM='gnome-256color'; | |
elif infocmp xterm-256color >/dev/null 2>&1; then | |
export TERM='xterm-256color'; | |
fi; |
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
/*** From http://hugogiraudel.com/2014/05/19/new-offsets-sass-mixin/ ***/ | |
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
// Helper mixin for offset positioning | |
// About: From http://hugogiraudel.com/2014/05/19/new-offsets-sass-mixin/ | |
// --- |