Skip to content

Instantly share code, notes, and snippets.

View chrisvanpatten's full-sized avatar

Chris Van Patten chrisvanpatten

View GitHub Profile
@jbrinley
jbrinley / force-plugin-activation.php
Last active November 5, 2020 15:11
An mu-plugin that forces selected plugins to be active, without the capability to deactivate.
<?php
/*
Plugin Name: Force Plugin Activation/Deactivation (except if WP_DEBUG is on)
Plugin URI: http://tri.be/
Description: Make sure the required plugins are always active.
Version: 1.0
Author: Modern Tribe, Inc.
Author URI: http://tri.be/
*/
@mcfarlan
mcfarlan / look-up-woo-deprecation.sh
Last active September 28, 2017 17:13
Looks for deprecated WooCommerce filters (v3.x.x)
#!/bin/bash
FUNCTIONS="
woocommerce_email_order_schema_markup,
add_to_cart_fragments,
add_to_cart_redirect,
woocommerce_product_width,
woocommerce_product_height,
woocommerce_product_length,
woocommerce_product_weight,
@ianmjones
ianmjones / build-as3cf-aws2.sh
Last active March 21, 2025 19:21
A script for downloading the AWS PHP SDK v2, stripping down to S3 functionality and then applying a custom namespace.
#!/usr/bin/env bash
set -e
if [ ! -d src/amazon-s3-and-cloudfront ]; then
echo 'This script must be run from the repository root.'
exit 1
fi
for PROG in composer find sed