Skip to content

Instantly share code, notes, and snippets.

@BronsonQuick
BronsonQuick / remove-default-patterns.php
Created June 30, 2023 22:19
Remove the default Patterns included into WordPress
<?php
/**
* Prevent the loading of patterns from the WordPress.org Pattern Directory
*/
add_filter( 'should_load_remote_block_patterns', '__return_false' );
/**
* Remove patterns that ship with WordPress Core.
*/
function bbfs_remove_core_block_patterns() {
@BronsonQuick
BronsonQuick / theme.json
Created June 30, 2023 22:18
Client Proof WordPress blocks
{
"$schema": "https://schemas.wp.org/wp/6.2/theme.json",
"version": 2,
"settings": {
"appearanceTools": false,
"border": {
"color": false,
"radius": false,
"style": false,
"width": false
@BronsonQuick
BronsonQuick / diff.sh
Created May 29, 2020 00:10
A gist that feeds diffs into a variable for precommit checks.
# Determine modified and staged files.
JSSTAGED=$(git --no-pager diff --relative --name-only --cached --diff-filter=d -- '**/*.js' \
| xargs -L 1 printf "%s/%s\n" "$PWD")
PHPSTAGED=$(git --no-pager diff --relative --name-only --cached --diff-filter=d -- '**/*.php' \
| xargs -L 1 printf "%s/%s\n" "$PWD")
CSSSTAGED=$(git --no-pager diff --relative --name-only --cached --diff-filter=d -- '**/*.css' \
| xargs -L 1 printf "%s/%s\n" "$PWD")
SCSSSTAGED=$(git --no-pager diff --relative --name-only --cached --diff-filter=d -- '**/*.scss' \
| xargs -L 1 printf "%s/%s\n" "$PWD")
TSSTAGED=$(git --no-pager diff --relative --name-only --cached --diff-filter=d -- '**/*.ts' '**/*.tsx' \
@BronsonQuick
BronsonQuick / gist:4c7fd31b851da4fc28ea296f0eb95868
Last active March 22, 2018 08:48
A script to setup wpaustralia.org
#!/usr/bin/env sh
set -e
HAS_GIT=`command -v git 2&>/dev/null || echo "false"`
HAS_BREW=`command -v brew 2&>/dev/null || echo "false"`
HAS_VAGRANT=`command -v vagrant 2&>/dev/null || echo "false"`
HAS_VIRTUALBOX=`command -v VirtualBox 2&>/dev/null || echo "false"`
RED=`tput setaf 1`
@BronsonQuick
BronsonQuick / config.local.yaml
Last active March 22, 2018 23:06
A Chassis config file for local development of wpaustralia.org
# Chassis configuration
hosts:
- wpaustralia.local
# Extensions
#
# Install a list of extensions automatically
extensions:
- chassis/xdebug
- chassis/mailhog
hosts:
- thunderhead.local
database:
name: wordpress
user: wordpress
password: vagrantpassword
prefix: thunderhead_
admin:
user: admin
email: admin@example.com
@BronsonQuick
BronsonQuick / lotsa_extensions.yaml
Last active May 7, 2020 00:49
All The Chassis extensions for testing updates.
extensions:
- chassis/tester
- chassis/mailhog
- chassis/xdebug
- chassis/nodejs
- chassis/fish
- chassis/gulp
- chassis/grunt
- chassis/imagick
- chassis/gmagick
chassis ⟩ vagrant up --provider=vmware_fusion
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Checking if box 'bento/ubuntu-16.04' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Fixed port collision for 22 => 2222. Now on port 2203.
==> default: Starting the VMware VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 172.16.138.166:22
default: SSH username: vagrant
$taxonomies = Fusion()->get_content_taxonomies();
foreach ( $taxonomies as $taxonomy ) {
$tax_query['tax_query'][] = array(
'field' => 'term_id',
'terms' => $tags,
'taxonomy' => $taxonomy,
);
}
### Keybase proof
I hereby claim:
* I am BronsonQuick on github.
* I am bronsonquick (https://keybase.io/bronsonquick) on keybase.
* I have a public key whose fingerprint is 9697 FB93 A316 562E 7930 341E 7576 844C 8CBE AA39
To claim this, I am signing this object: