Skip to content

Instantly share code, notes, and snippets.

View thefrosty's full-sized avatar
🏖️
Santa Monica WordPress Developer

Austin Passy thefrosty

🏖️
Santa Monica WordPress Developer
View GitHub Profile
@thefrosty
thefrosty / freemius.php
Created January 12, 2024 17:39
Create an override function, as to bypass Freemius in some less than smart plugins.
<?php
declare(strict_types=1);
/**
* Create an override function, as to bypass Freemius in stupid plugins.
* @wordpress-muplugin
* Plugin Name: Freemius Killer
* Description: Global override for Freemius' "loader".
* Version: 1.0.0
@thefrosty
thefrosty / deploy.yml
Created November 22, 2023 18:51
GitHub Action Workflow
name: "Deploy to Linode"
on:
push:
branches:
- master
workflow_dispatch:
jobs:
tag:
@thefrosty
thefrosty / post-requirements.js
Created March 1, 2022 20:04
Require Post Title for Custom Post Type(s)
/** global jQuery */
(function ($) {
'use strict'
const requirements = {
$title: $('#title')
}
/**
* Initiate.
@thefrosty
thefrosty / app-passwords-client-demo.php
Last active January 23, 2021 21:05 — forked from TimothyBJacobs/app-passwords-client-demo.php
App Passwords Client Demo Plugin
<?php declare(strict_types=1);
/**
* Plugin Name: Demo App Passwords Client
*/
namespace TimothyBJacobs\AppPasswordsClientDemo;
const META_KEY = '_app_passwords_client_demo_creds';
const PAGE = 'app-passwords-demo';
@thefrosty
thefrosty / get-post-by-slug.php
Last active June 5, 2020 15:11
Validate REST API requests by slug, and set proper response 404 status when not found.
<?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: https://github.com/thefrosty
* Version: 1.0.0
@thefrosty
thefrosty / mailhog-mamp.md
Created June 27, 2018 00:44 — forked from jaredatch/mailhog-mamp.md
Install MailHog with MAMP Pro

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

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

$ brew update
@thefrosty
thefrosty / wp-rest-api-cache.php
Created February 1, 2018 21:47
WpRestApiCache Controller
<?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
thefrosty / Add2faMetaBox.php
Created May 4, 2017 17:32
Dovedi and WP User Profiles support.
<?php
namespace Dwnload\Plugins\Dovedi;
/**
* Class Add2faMetaBox
*
* @package Dwnload\Plugins\Dovedi
*/
class Add2faMetaBox {
@thefrosty
thefrosty / wp-cl-customizer.php
Created February 22, 2016 17:49
Basic WordPress customizer setting.
<?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',
array(
@thefrosty
thefrosty / cron.class.php
Last active August 29, 2015 14:26 — forked from jonathonbyrdziak/cron.class.php
Wordpress Cron Job Class. Makes Cronning a snap!
<?php
/**
* @Author Anonymous
* @link http://www.redrokk.com
* @Package Wordpress
* @SubPackage RedRokk Library
* @copyright Copyright (C) 2011+ Redrokk Interactive Media
*
* @version 0.1
*/