Skip to content

Instantly share code, notes, and snippets.

Santa Monica WordPress Developer

Austin Passy thefrosty

Santa Monica WordPress Developer
View GitHub Profile
thefrosty / get-post-by-slug.php
Last active Jun 5, 2020
Validate REST API requests by slug, and set proper response 404 status when not found.
View get-post-by-slug.php
<?php declare(strict_types=1);
* Get Post By Slug
* @wordpress-plugin
* Plugin Name: Not Found Posts by Slug to 404
* Description: Validate REST API requests by slug, and set proper response 404 status when not found.
* Author: Austin Passy
* Author URI:
* Version: 1.0.0
thefrosty / WordPress md5 shortcode
Created Aug 6, 2012
Get the md5 hash of an email for gravatar or other purposes.
View WordPress md5 shortcode
add_shortcode( 'md5', 'md5_email_hash' );
function md5_email_hash( $atts ) {
extract( shortcode_atts( array(
'hash' => '',
), $atts ) );
$hash = ( isset( $_GET['email'] ) && !empty( $_GET['email'] ) ) ? $_GET['email'] : $hash;
$hash = is_email( $hash ) ? sanitize_email( strtolower( $hash ) ) : trim( $hash );
thefrosty /
Created Jun 27, 2018 — forked from jaredatch/
Install MailHog with MAMP Pro

Install MailHog with MAMP Pro, using HomeBrew.


First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update
thefrosty / wp-rest-api-cache.php
Created Feb 1, 2018
WpRestApiCache Controller
View wp-rest-api-cache.php
* WpRestApiCache Controller.
* This file extend the wp-rest-api-cache plugin that allows filtering of
* cache depending on conditions met.
* @package BeachbodyOnDemand\WpRestApiCache
namespace BeachbodyOnDemand\WpRestApiCache;
thefrosty / Add2faMetaBox.php
Created May 4, 2017
Dovedi and WP User Profiles support.
View Add2faMetaBox.php
namespace Dwnload\Plugins\Dovedi;
* Class Add2faMetaBox
* @package Dwnload\Plugins\Dovedi
class Add2faMetaBox {
thefrosty / plugins-loader.php
Last active Feb 7, 2017
Enables the loading of plugins not sitting in the mu-plugins directory to allow auto-updates and correct directory reads.
View plugins-loader.php
* Plugin Name: Autoload Plugins
* Plugin URI:
* Description: Autoload non-MU plugins that live in the `wp-content/plugins` directory. This allows auto-updates to
* work but have to plugin act like an must-use plugin.
* Version: 0.2.1
* Author: Austin Passy
* Author URI:
thefrosty / wp-cl-customizer.php
Created Feb 22, 2016
Basic WordPress customizer setting.
View wp-cl-customizer.php
namespace Passy;
add_action( 'customize_register', __NAMESPACE__ . '\\customize_register' );
function customize_register( WP_Customize_Manager $wp_customize ) {
$wp_customize->add_panel( 'custom_login_settings',
thefrosty / .htaccess
Created Jan 21, 2014
Can't seem to get this to work. Want all WordPress media files to point to the new Multisite install folder.
View .htaccess
RewriteRule ^/wp-content/uploads/([0-9]{4})/([0-9]{2})/(.*)$$1/$2/$3 [L,R=301]
thefrosty / Get emails from a page.
Created May 24, 2013
I used this to scrape emails from a BuddyPress pending approvals page to email all users to verify non-spam.
View Get emails from a page.
var Values = [];
jQuery('#pw_pending_users a[href^="mailto:"]').each(function() {
var $this = jQuery(this);
console.log(Values.join(', '));
View gist:5496695
Plugin Name: Easy Digital Downloads - Variable Pricing License Activation Limits
Plugin URL:
Description: Limit the number of license activations permitted based on variable prices
Version: 1.0.3
Author: Pippin Williamson
Author URI:
Contributors: mordauk
You can’t perform that action at this time.