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
//1. Add a new form element... | |
add_action('register_form','erwp_register_form'); | |
function erwp_register_form (){ | |
$spam = ( isset( $_POST['fooey'] ) ) ? $_POST['fooey']: ''; | |
?> | |
<input type="text" name="fooey" value="<?php echo esc_attr(stripslashes($spam)); ?>" style="display: none;" /> | |
<?php | |
} | |
//2. Add validation. In this case, we make sure fooey is empty. |
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: ER Post Password Expires | |
Plugin URI: https://squareone.software | |
Description: Sets the expiration of a post/page password protected page | |
Version: 1.0.0 | |
Author: Elliott Richmond | |
Author URI: https://squareone.software | |
Text Domain: er-post-password-expires |
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 | |
/* a couple of filters to remove elements from titles */ | |
add_filter( 'get_the_archive_title', 'wptv_remove_title_elements', 10, 1); | |
function wptv_remove_title_elements($title) { | |
if ( is_category() ) { | |
$title = single_cat_title( '', false ); | |
} | |
return $title; |
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
#!/bin/bash | |
# Update any existing home-brew recipes | |
brew update | |
# Upgrade any already installed formulae | |
brew upgrade | |
# Install my brew packages | |
brew install wget |
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
#!/bin/bash | |
# download the core | |
wp core download --locale=en_GB | |
# setup the wp-config | |
read -p "DB Name?: " -e DBNAME | |
read -p "DB Password?: " -e DBPASS | |
read -p "DB Prefix?: " -e DBPREFIX |