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 | |
/** | |
* Creates the initial content for a newly-installed site. | |
* | |
* Adds sensible defaults for a new install | |
* | |
* @param int $user_id User ID. | |
*/ |
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: Force SSL | |
* Description: Force all URL's to use SSL | |
* Version: 1.0.0 | |
* Author: James Morrison | |
* Author URI: https://www.jamesmorrison.me/ | |
**/ | |
/** |
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: User Security | |
* Description: Hides login errors, disables author archives (to hide usernames), changes author links to title => sitename / URL => homepage | |
* Version: 1.0.0 | |
* Author: James Morrison | |
* Author URI: https://james.morrison.me/ | |
**/ | |
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
INITIALISATION | |
============== | |
load wp-config.php | |
set up default constants | |
load wp-content/advanced-cache.php if it exists | |
load wp-content/db.php if it exists | |
connect to mysql, select db | |
load object cache (object-cache.php if it exists, or wp-include/cache.php if not) | |
load wp-content/sunrise.php if it exists (multisite only) |
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: Remote Uploads | |
* Plugin URL: https://www.jamesmorrison.me/plugins/remote-uploads/ | |
* Version: 1.0.0 | |
* Author: James Morrison | |
* Author URI: https://www.jamesmorrison.me/ | |
* | |
* |
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_tag_cloud( [ | |
'taxonomy' => '%%TAXONOMY-NAME%%', | |
'separator' => ' ', | |
'include' => implode(',', wp_list_pluck( get_the_terms( get_the_ID(), '%%TAXONOMY-NAME%%' ), 'term_id' ) ) | |
] ); |
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 CLI | |
if ( defined( 'WP_CLI' ) && ! isset( $_SERVER[ 'SERVER_NAME' ] ) ) { | |
$_SERVER[ 'SERVER_NAME' ] = ''; | |
} | |
// Database |
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: Remote Uploads | |
* Plugin URL: https://www.jamesmorrison.me/plugins/remote-uploads/ | |
* Version: 1.0.0 | |
* Author: James Morrison | |
* Author URI: https://www.jamesmorrison.me/ | |
* | |
* |
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
## CMD PROMPT | |
green=$(tput setaf 2) | |
blue=$(tput setaf 4) | |
white=$(tput setaf 7) | |
bold=$(tput bold) | |
reset=$(tput sgr0) | |
PS1='${debian_chroot:+($debian_chroot)}\[$green\]MAC\[$reset\]:\[$white\]\w\[$reset\]\[$green\]$(parse_git_branch)\[$reset\]\$ ' |
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: Cache Controller | |
* Plugin URI: # | |
* Description: HTTP Cache Control headers for WordPress. | |
* Version: 0.0.1 | |
* Author: James Morrison | |
* Author URI: https://james.morrison.me/ | |
**/ |