Skip to content

Instantly share code, notes, and snippets.

View theMikeD's full-sized avatar

theMikeD theMikeD

View GitHub Profile
@theMikeD
theMikeD / gist:084abf3be77deb09ff02
Last active August 29, 2015 14:01
Code to specify a location for Wordpress's wp-content folder. Goes into wp-config.php
$md_http = ($_SERVER['HTTPS']) ? 'https://': 'http://';
// MD: Note that $_SERVER['DOCUMENT_ROOT'] will return a string with a trailing slash on
// some systems and not others, so we'll make sure it's gone in all cases where there
// is ambiguity by using rtrim
define('WP_CONTENT_DIR', rtrim($_SERVER['DOCUMENT_ROOT'],"/") . '/wp-content');
define('WP_CONTENT_URL', $md_http . rtrim($_SERVER['SERVER_NAME'],"/") . '/wp-content');
@theMikeD
theMikeD / gist:a224befb81c908ad0ece
Created May 2, 2014 15:10
Rename Blog to Article
add_action( 'admin_menu', 'md_change_post_menu_label' );
function md_change_post_menu_label() {
global $menu;
global $submenu;
$menu[5][0] = 'Articles';
$submenu['edit.php'][10][0] = 'Add Article';
}