I hereby claim:
- I am jamesmorrison on github.
- I am jamesmorrison (https://keybase.io/jamesmorrison) on keybase.
- I have a public key ASCOzeBwCWH4T4s-tlSOGJ8tu6ynXAHJVJAe_Vo3U5vBcQo
To claim this, I am signing this object:
<?php | |
/** | |
* | |
* Filter post slug | |
* This needs saving as post meta to use that value rather than regenerate a new one | |
* | |
**/ | |
add_filter( 'wp_unique_post_slug', function( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) { |
<?php | |
// PHP memory limit for this site | |
define( 'WP_MEMORY_LIMIT', '128M' ); | |
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit. | |
// Database | |
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database. | |
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users) | |
// Explicitely setting url |
#!/bin/bash | |
# Exit on failure | |
set -e | |
# Create the root key | |
openssl genrsa -out ./root.key 2048 | |
# Generate the root certificate | |
openssl req -x509 -new -nodes -key ./root.key -sha256 -days 3650 -out ./root.crt -subj /C=XX/ST=LocalHost/L=LocalHost/O=LocalHost/OU=LocalHost/CN=localhost |
##### Define the stages for this pipeline | |
stages: | |
- check | |
- preview | |
- deploy | |
##### Check | |
Check: |
<?php | |
/** | |
* Plugin Name: WP Basic HTTP Authentication | |
* Plugin URI: | |
* Description: Adds HTTP Authentication to a WordPress site | |
* Author: James Morrison | |
* Version: 1.0.2 | |
* Author URI: https://www.jamesmorrison.me | |
**/ |
I hereby claim:
To claim this, I am signing this object:
## 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\]\$ ' |
<?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/ | |
**/ | |
<?php | |
// Set up default query | |
$locations_query_args = [ | |
'post_type' => 'locations', | |
'post_status' => 'publish', | |
'posts_per_page' => 500, | |
]; | |
// Add the search query if set ($town_city_selected) |
<?php | |
/** | |
* Plugin Name: Filter WP Basic HTTP Authentication Credentials | |
* Description: Filter WP Basic HTTP Authentication Credentials to use environment variables | |
* Author: James Morrison | |
* Version: 1.0.0 | |
* Author URI: https://www.jamesmorrison.me | |
**/ | |
// Filter the credentials |