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
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
<?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/ | |
**/ |
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
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi |
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: Rewrite Search URL's | |
* Description: Rewrite search URL's to "pretty" permalinks. A custom permalink structure must be set. | |
* Version: 1.0.1 | |
* 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 | |
/** | |
* @package Header for WP Signup | |
* @author James Morrison | |
* @link https://gist.github.com/jamesmorrison/5f8a3108b2a773cd07db430b73992e9d/edit | |
* | |
* This file is called by the WP core /wp-signup.php file; we can force a redirect from here | |
* | |
* Whilst you can do this from the NOBLOGREDIRECT constant, the advantage of using this header | |
* file is that you can capture the path that triggered the call to signup; as seen in the example |