View prevent-plugin-update-dot-org.php
<?php | |
// Prevent updating of specific dot org plugins. | |
add_filter( | |
'site_transient_update_plugins', | |
function( $transient ) { | |
$plugin_arr = [ 'test-plugin2/test-plugin2.php', 'akismet/akismet.php' ]; | |
foreach ( $plugin_arr as $plugin_file ) { | |
if ( isset( $transient->response[ $plugin_file ]->id ) | |
&& false !== strpos( $transient->response[ $plugin_file ]->id, 'w.org/plugins' ) | |
) { |
View rollback-testing.php
<?php | |
/** | |
* Rollback Update Testing | |
* | |
* @package rollback-update-testing | |
* @author Andy Fragen <andy@thefragens.com> | |
* @license MIT | |
*/ | |
/** |
View local-edd-store.php
<?php | |
/** | |
* Plugin Name: Local EDD Store | |
* Description: Set `reject_unsafe_urls` to false for $store_url. $store_url will need to be set for the URL of your local EDD store. | |
* Author: Andy Fragen | |
* Version: 0.3 | |
* Gist Plugin URI: https://gist.github.com/afragen/ed00f34f8e03aeedb96bdbf6f3e50495 | |
*/ | |
add_filter( |
View site-testing.php
<?php | |
/** | |
* Plugin Name: Site Testing | |
* Plugin URI: https://gist.github.com/afragen/a30b7766d8eb1aa22018130dfd5034f4 | |
* Description: This plugin is used for site testing. | |
* Version: 0.3 | |
* Author: Andy Fragen | |
* License: MIT | |
* Requires at least: 5.2 | |
* Requires PHP: 7.1 |
View wp-mail-smtp-shim.php
<?php | |
/** | |
* WP Mail SMTP Shim for WP 5.5 plugin bootstrap. | |
* | |
* @package WP_Mail_SMTP_Shim | |
* @author Andy Fragen | |
* @license MIT | |
* | |
* @wordpress-plugin | |
* Plugin Name: WP Mail SMTP Shim for WP 5.5 |
View switch-dependency-label.php
<?php | |
/** | |
* Switch Plugin Dependency Label for WP Dependency Installer | |
* | |
* @package Switch_Plugin_Dependency_Label | |
* @author Andy Fragen | |
* @license MIT | |
* | |
* @wordpress-plugin | |
* Plugin Name: Switch Plugin Dependency Label |
View .phpcs.xml
<?xml version="1.0"?> | |
<ruleset name="WordPress-Beta-Tester"> | |
<description>Keep long array syntax.</description> | |
<!-- Include main ruleset.xml --> | |
<rule ref="/Users/afragen/code-standards/ruleset.xml"/> | |
<rule ref="Generic.Arrays.DisallowShortArraySyntax" /> | |
<!-- Use only long arrays --> | |
<rule ref="Generic.Arrays"> |
View set-category-colors-hash.php
<?php | |
/** | |
* Plugin Name: Set Category Colors Options Hash | |
* Author: Andy Fragen | |
* Author URI: https://github.com/afragen | |
* Version: 0.1 | |
* Requires PHP: 5.3 | |
*/ | |
add_filter( 'teccc_set_options_hash', function(){ |
View aliases.zsh
alias wp-git-core="sh -c \"\$(curl -fsSL https://gist.github.com/afragen/e1aa3ffccf1a73618ee6e756bd95d297/raw/core-git-wp.sh)\";cd ." | |
alias wp-git-develop="sh -c \"\$(curl -fsSL https://gist.github.com/afragen/e1aa3ffccf1a73618ee6e756bd95d297/raw/develop-git-wp.sh)\";cd ." | |
alias local-socket="SOCKET=\$(mysqld --verbose --help | grep ^socket | awk '{print \$2, \$3, \$4}');ln -sfv \$SOCKET /tmp/mysql.sock" | |
alias brewup="brew update && brew upgrade && brew cleanup && brew doctor" | |
#lsof -i | grep LISTEN | grep 'nginx\|httpd' | |
alias http-listen="lsof -i | grep LISTEN | grep 'nginx\|httpd'" |
View apply-trac-patch.sh
#!/usr/bin/env bash | |
# ==================================================================================== | |
# Script to install patches or changesets to https://core.trac.wordpress.org | |
# I use with Local Lightning by Flywheel by installing in `/app` directory. | |
# | |
# Patches and changesets are saved in `/tmp/` as a default. | |
# You will use the patch URL in the script. | |
# ==================================================================================== |
NewerOlder