Skip to content

Instantly share code, notes, and snippets.


Andy Fragen afragen

View GitHub Profile
afragen /
Last active May 30, 2023 16:09
My setup for wordpress-develop Docker wp environment on Apple Silicon with xDebug active

These are the files needed for setting up the Docker wp environment for wordpress-develop with xDebug active on Apple Silicon. Currently Docker wp runs

  • PHP 7.4.33
  • xDebug 3.1.6

I created and placed the custom-php-config.ini file one level above wordpress-develop.

The docker-compose.override.yml is at the root level of wordpress-develop.

Then simply follow the instructions in the

afragen / .wp-env.json
Created May 24, 2023 19:26
Just an example, doesn't work for core development.
View .wp-env.json
"core": "WordPress/wordpress-develop#trunk",
"phpVersion": "8.1",
"plugins": [
"port": 8888,
"testsPort": 8889,
"config": {
"WP_DEBUG": true,
afragen / phpcs.xml
Last active April 2, 2023 18:09
phpcs files for my plugins and core plugins
View phpcs.xml
<?xml version="1.0"?>
<ruleset name="AJF-Coding-Standards">
<description>A custom ruleset to take in account both WordPress and personal standards.</description>
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>
<!-- Exclude these -->
afragen / karma.php
Last active April 30, 2023 00:10
Impose karma on specific users
View karma.php
* Karma.
* @package Fragen\Karma
* Plugin Name: Karma
* Plugin URI:
* Description: Impose karma on users.
* Version: 0.6.0
afragen / git-updater-fastspring-popup.php
Created November 3, 2022 23:34
Add javascript for FastSpring's Git Updater popup store.
View git-updater-fastspring-popup.php
* Add FastSpring popup store script for Git Updater.
* @package FastSpringPopUpStore
* Plugin Name: FastSpring Popup Store for Git Updater
* Plugin URI:
* Description: Add FastSpring popup store javascript for Git Updater.
* Version: 0.1.0
afragen / php.ini.hbs
Last active January 11, 2023 22:29
Stuff for xDebug 3.x and Local
View php.ini.hbs
; Add to all lightning services PHP conf files using xDebug 3.x
; Add to all lightning services PHP conf files using xDebug 2.x
afragen / trick-auto-update.php
Created August 24, 2022 20:03
Allows one to mash the WP Crontrol 'Run now' link with abandon.
View trick-auto-update.php
* Trick `WP_Automatic_Updater` into thinking there is no existing lock.
* By default, the auto-updater will only run once every hour even if
* the cron job is manually fired. That makes it hard to run multiple tests
* in a short period of time.
function ($value) {
View test-fatal.php
* Auto-update fatal error check test plugin.
* @package AutoUpdateFatalErrorCheck
* Plugin Name: Auto-update Fatal Error Check Test Plugin
* Plugin URI:
* Description: Set local version to 0 and comment code from plugin for testing.
* Version: 0.1.1
afragen / auto-update-fatal-error-check.php
Last active August 3, 2022 17:55
Run the Rollback code if the plugin has an activation error.
View auto-update-fatal-error-check.php
* Auto-update fatal error check.
* @package AutoUpdateFatalErrorCheck
* Plugin Name: Auto-update Fatal Error Check
* Plugin URI:
* Description: Check for a PHP error on plugin auto-update and deactivate plugin if one exists.
* Version: 0.4.2
afragen / gist-oembed.php
Last active August 5, 2022 19:56
WordPress plugin to embed gists or gist files.
View gist-oembed.php
* Gist oEmbed.
* @package Fragen\Gist_OEmbed
* Plugin Name: Gist oEmbed
* Plugin URI:
* Description: oEmbed Gist or files within Gists.
* Version: 0.6.2