Skip to content

Instantly share code, notes, and snippets.

View mwhiteley16's full-sized avatar

Matt Whiteley mwhiteley16

View GitHub Profile
@mwhiteley16
mwhiteley16 / plugin-gravityforms.php
Created September 11, 2026 12:09
Gravity Forms Custom Validation
<php
/**
* Validate Gravity Forms text and name fields.
*
* Rejects common gibberish patterns, repeated characters, invalid characters,
* and values shorter than two characters.
*
* @since 1.6.2
*
* @param array $validation_result Gravity Forms validation result.
@mwhiteley16
mwhiteley16 / block.js
Created September 2, 2026 14:22
Slideshow Block
(function ($) {
'use strict';
const flickityOptions = {
autoPlay: 6000,
cellAlign: 'left',
cellSelector: '.block-slideshow__slide',
dragThreshold: 25,
imagesLoaded: true,
pageDots: true,
@mwhiteley16
mwhiteley16 / block.json
Created September 1, 2026 12:15
ACF Block Testing
{
"name": "wd/acf-icon-button",
"title": "Icon Button Block",
"description": "",
"style": "block-icon-button",
"category": "wd-blocks",
"icon": "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22.5 22.5'><defs><style>.a{fill:#222;}.b{fill:#1fa8af;}</style></defs><path class='a' d='M20.17,4a10.17,10.17,0,0,0-7-3.5L11.91.38h-.18a.64.64,0,0,0-.47.13A.68.68,0,0,0,11,.93L10.6,3.79a.48.48,0,0,0,.12.43.54.54,0,0,0,.44.18h.11l1.44.17c3.94.45,6.12,2.69,5.84,6a8.37,8.37,0,0,1-2.49,5.12A8.14,8.14,0,0,1,10,18.06l-.65,0H9.15a.8.8,0,0,0-.5.17.68.68,0,0,0-.25.44L8,21.5a.49.49,0,0,0,.12.42.57.57,0,0,0,.45.18h.17l1,0h.34a11.61,11.61,0,0,0,8.21-3.39,12.76,12.76,0,0,0,3.77-7.92A9.49,9.49,0,0,0,20.17,4Z'/><path class='b' d='M9.2,17h.15L10,17a7.61,7.61,0,0,0,3.64-.77L15,6.15a8.65,8.65,0,0,0-2.33-.57l-1-.12-1,7.35L9.23,7c-.11-.45-.33-.67-.65-.67H7.16c-.29,0-.5.22-.65.67L5.1,12.81,3.82,3a.55.55,0,0,0-.61-.55H.78a.36.36,0,0,0-.29.16A.6.6,0,0,0,.37,3a.5.5,0,0,0,0,.18L2.53,19.22a1.07,1.07,0,0,0,.23.6.64.64,0,0,0,.53.23H5.16
@mwhiteley16
mwhiteley16 / feast.html
Created July 9, 2026 20:10
Feast Issue
<?php
/**
* Feast Plugin Audit.
*
* (c) Feast Design Co. 2018 - 2026
*
* This source file is subject to the GPL license that is bundled
* with this source code in the file LICENSE.
*
* @package Feast\Subscriber
@mwhiteley16
mwhiteley16 / comments.css
Created May 8, 2026 15:23
Earth Trekkers Comments CSS
/* ----- Comments -------------------- */
.x-comments-area {
margin: 4em 0 0;
}
.h-comments-title span {
position: relative;
}
.h-comments-title small {
@mwhiteley16
mwhiteley16 / block.js
Created October 13, 2025 12:04
ACF Block Registration Example
(function($){
// front end render on first instance of block only
$(document).ready(function(){
$('.block-faq').each(function(){
faqBlockInit();
return false;
});
});
@mwhiteley16
mwhiteley16 / config.codekit3
Created September 2, 2025 12:25
Rands CodeKit Config
{
"AAInfo" : "This is a CodeKit 3 project config file. EDITING THIS FILE IS A POOR LIFE DECISION. Doing so may cause CodeKit to crash and\/or corrupt your project. Several critical values in this file are 64-bit integers, which JavaScript JSON parsers do not support because JavaScript cannot handle 64-bit integers. These values will be corrupted if the file is parsed with JavaScript. This file is not backwards-compatible with CodeKit 1 or 2. For details, see https:\/\/codekitapp.com\/",
"buildSteps" : [
{
"name" : "Process All Remaining Files and Folders",
"stepType" : 1,
"uuidString" : "7696841A-545F-48F3-9A59-C5242E3D740A"
}
],
"creatorBuild" : "34892",
@mwhiteley16
mwhiteley16 / mediavine.php
Last active March 14, 2025 14:55
Feast Mediavine Integration
<?php
/**
* Defines all of the code related to the Mediavine integrations.
*
* @see feast-plugin.php
* @package Feast
*/
namespace Feast\Integrations\Mediavine;
@mwhiteley16
mwhiteley16 / config.codekit3
Created October 8, 2024 14:27
Engineering.com Stuff
{
"AAInfo" : "This is a CodeKit 3 project config file. EDITING THIS FILE IS A POOR LIFE DECISION. Doing so may cause CodeKit to crash and\/or corrupt your project. Several critical values in this file are 64-bit integers, which JavaScript JSON parsers do not support because JavaScript cannot handle 64-bit integers. These values will be corrupted if the file is parsed with JavaScript. This file is not backwards-compatible with CodeKit 1 or 2. For details, see https:\/\/codekitapp.com\/",
"buildSteps" : [
{
"name" : "Process All Remaining Files and Folders",
"stepType" : 1,
"uuidString" : "EFB9BF85-E9F2-4E78-B650-4DB87C7FEE19"
}
],
"creatorBuild" : "34590",
@mwhiteley16
mwhiteley16 / config.codekit3
Created September 9, 2024 17:39
HitTrax CodeKit config
{
"AAInfo" : "This is a CodeKit 3 project config file. EDITING THIS FILE IS A POOR LIFE DECISION. Doing so may cause CodeKit to crash and\/or corrupt your project. Several critical values in this file are 64-bit integers, which JavaScript JSON parsers do not support because JavaScript cannot handle 64-bit integers. These values will be corrupted if the file is parsed with JavaScript. This file is not backwards-compatible with CodeKit 1 or 2. For details, see https:\/\/codekitapp.com\/",
"buildSteps" : [
{
"name" : "Process All Remaining Files and Folders",
"stepType" : 1,
"uuidString" : "7696841A-545F-48F3-9A59-C5242E3D740A"
}
],
"creatorBuild" : "34576",