Skip to content

Instantly share code, notes, and snippets.

@brandonjp
brandonjp / crowdwork-change-button-texts.js
Created July 28, 2025 18:40
CrowdWork - change the text of any button by specificing in the config of this script
/**
* Button Text Configuration Script
* Version: 2.0.0
*
* Configurable script to change multiple button texts based on matching criteria
*/
(function() {
// Button text replacements
@brandonjp
brandonjp / crowdwork-auto-select-one-ticket.js
Created July 28, 2025 18:27
CrowdWork - on an event page, if there's only one ticket tier, then auto select one ticket
/**
* Auto-select 1 ticket when only one tier is available
* Version: 1.0.0
*/
(function() {
'use strict';
function autoSelectSingleTier() {
// Find all ticket selection containers
@brandonjp
brandonjp / crowdwork-schema.js
Created July 25, 2025 04:00
Schema.org Implementation for CrowdWork Events
/*
* Recommended Schema.org Implementation for CrowdWork Events
* Version: 1.0.0
*
* This script intercepts the API call made by embed.js to generate
* schema.org markup immediately when event data becomes available.
* Place this script BEFORE the embed.js script tag.
*/
// Configuration - UPDATE THESE VALUES FOR YOUR THEATRE
@brandonjp
brandonjp / wp-inspector-enhanced.php
Last active July 2, 2025 13:10
WordPress Post Inspector [SnipSnip.pro] - displays post metadata, SEO information, and WordPress data in a floating panel with admin controls and configuration options. - https://snipsnip.pro/s/884
<?php
/**
* Title: Enhanced WordPress Post Inspector with Admin Controls [SnipSnip.pro]
* Description: A comprehensive debugging tool that displays post metadata, SEO information, and WordPress data in a floating panel. Features configurable position, admin settings, light/dark themes, enhanced data extraction, and security controls for developers.
* Version: 3.2.1
* Author: Brandon Pfeiffer
* Last Updated: 2025-07-01
* Blog URL: https://snipsnip.pro/s/884
* Gist URL: https://gist.github.com/brandonjp/025592669bce65f7031a00f8b04d5c97
* Code Snippets Cloud: https://codesnippets.cloud/snippet/brandonjp/WordPress-Post-541
@brandonjp
brandonjp / WP_Media_Library_GPS_Coordinates_Column.php
Last active August 6, 2025 12:29
Add GPS Coordinates Column to WordPress Media Library [SnipSnip.pro]
<?php
/**
* Title: Add GPS Coordinates Column to WordPress Media Library (Best Version)
* Description: Extracts and displays GPS coordinates from image EXIF data in the media library table view. Robust extraction (multiple fallbacks), developer-configurable UI, admin notice, and copy-to-clipboard functionality.
* Version: 1.6.0
* Author: brandonjp.com
* Last Updated: 2025-06-08
* Blog URL: http://snipsnip.pro/880
* Requirements: WordPress 5.0+
* License: GPL v2 or later
<!--
THEATER MENU CUSTOMIZER - COMPLETE SOLUTION
Instructions for partner theaters:
1. Copy this entire code block below
2. Paste it into your website before the closing </body> tag or directly in the custom code section of you Theatre Details
Page
3. Change ONLY these two lines below:
- Line 15: Change 'Performances' to your desired text for Shows
- Line 16: Change 'Workshops' to your desired text for Classes
-->
@brandonjp
brandonjp / wp-bulk-plugin-uploader.php
Last active June 12, 2025 01:07
Upload multiple WordPress plugins at once using a single ZIP file or several. You can select multiple zips. You can upload a big zip that contains multiple plugin zips or folders. You can set them all to auto-update, activate, replace existing, etc. Pretty cool! More info here: https://snipsnip.pro/s/868
<?php
/*
* Plugin Name: Bulk Plugin Upload
* Description: Upload multiple WordPress plugins at once using a single ZIP file or several.
* Excerpt: Improve native WordPress plugin uploading with this Bulk Plugin Uploader which allows you to upload multiple WordPress plugins at once. You can select several individual ZIP files for upload, or choose a single ZIP that contains multiple plugins—either as separate folders or nested ZIPs. This user-friendly tool simplifies plugin management, making it quick and easy to install, activate, and set up auto-updates for your plugins. Perfect for novice users looking to streamline their WordPress site management!
* Version: 2.3.6
* Author: brandonjp.com
* License: GPL v2 or later
* Text Domain: bulk-plugin-upload
*
@brandonjp
brandonjp / media-library-double-click-selection.php
Created February 19, 2025 05:30
Media Library Double-Click Selection [SnipSnip.pro] - https://snipsnip.pro/s/858 - Enhances the WordPress Media Library modal by enabling double-click to select and confirm media items. Double-clicking an image automatically selects it and triggers the select/insert button, streamlining the media selection workflow.
<?php
/**
* Title: Media Library Double-Click Selection [SnipSnip.pro]
* Description: Enhances the WordPress Media Library modal by enabling double-click to select and confirm media items. Double-clicking an image automatically selects it and triggers the select/insert button, streamlining the media selection workflow.
* Version: 2.2.0
* Author: brandonjp.com
* Last Updated: 2025-02-18
* Blog URL: https://snipsnip.pro/s/858
* Requirements: WordPress 5.0 or later
@brandonjp
brandonjp / Deactivate_Plugins_On_Staging.php
Created January 28, 2024 00:22
Deactivate Specific Plugins on Staging & Non-Production Sites [SnipSnip.pro] - https://snipsnip.pro/s/827
/**
* Deactivate Specific Plugins on Staging & Non-Production Sites [SnipSnip.pro] - https://snipsnip.pro/s/827
*/
if (!class_exists('Deactivate_Plugins_On_Staging')) {
/**
* Selectively deactivates plugins on staging and similar environments.
*/
class Deactivate_Plugins_On_Staging {
private $stagingKeywords = ['staging', 'dev', 'local', 'test', 'sandbox', 'demo'];
private $forceDeactivations = false; // Set to true to deactivate regardless of environment detection.
@brandonjp
brandonjp / Deactivate_Plugins_On_Production.php
Last active January 28, 2024 00:21
Deactivate Specific Plugins on Production Sites [SnipSnip.pro] - https://snipsnip.pro/s/825
/**
* Deactivate Specific Plugins on Production Sites [SnipSnip.pro] - https://snipsnip.pro/s/825
*/
if (!class_exists('Deactivate_Plugins_On_Production')) {
/**
* Selectively deactivates plugins on production environments.
*/
class Deactivate_Plugins_On_Production {
private $stagingKeywords = ['staging', 'dev', 'local', 'test', 'sandbox', 'demo'];
private $forceDeactivations = false; // Set to true to deactivate regardless of environment detection.