This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: ExamplePlugin | |
* Version: 1.0.0 | |
*/ | |
if (!defined('ABSPATH')) { | |
exit; // Exit if accessed directly | |
} | |
add_action( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Watch for cloudflared failures and restart the service. | |
# | |
# This is necessary due to a known issue between cloudflared and Raspberry Pis: | |
# https://github.com/cloudflare/cloudflared/issues/23 | |
# | |
# Script based on reddit thread: | |
# https://www.reddit.com/r/pihole/comments/b94dcr/cloudflare_dns_over_https_doesnt_work_after_a/err2rbj/ | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Drop this file into wp-content/mu-plugins. | |
// Test 1 - Remove Feedback callbacks from data export/erasure tools. | |
// Uncomment the next two lines to test. | |
//add_filter( 'wp_privacy_personal_data_exporters', 'remove_feedback_callback', 20 ); | |
//add_filter( 'wp_privacy_personal_data_erasers', 'remove_feedback_callback', 20 ); | |
function remove_feedback_callback( $callbacks ) { | |
unset( $callbacks['jetpack-feedback'] ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/bash | |
# Apply a Trac patch. | |
# | |
# See http://scribu.net/wordpress/contributing-to-wordpress-using-github.html | |
# | |
# $1 - The URL of the patch. | |
# $2 - Optional. Number of leading slashes in the prefix to strip. Default 0. | |
# $3 - Optional. The VCS to use. 'svn' or 'git'. Default 'svn'. | |
function tracpatch() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Environment Flag | |
* Description: Show the current environment (ie. local, staging, production) in the Admin Bar. | |
* Version: 1.0 | |
* Author: Corey McKrill | |
* Author URI: http://coreymckrill.com/ | |
* License: GNU General Public License v2.0 | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom WP-CLI commands | |
* | |
* Usage (from within a WP directory): | |
* $ wp --require=/path/to/wp-cli-custom.php vvv [function name] [parameters] | |
* | |
* @package wp-cli | |
*/ |