Skip to content

Instantly share code, notes, and snippets.

@0aveRyan
0aveRyan / universal-lando-wp-config.php
Created January 4, 2019 16:51
Universal Lando wp-config.php file grabbing creds from the env variable
<?php
/**
* !!! PLEASE CYCLE YOUR SALTS !!!
*
* @package WordPress
*/
/**
* Locate & Decode Database Credentials from Lando Info
*/
@0aveRyan
0aveRyan / filter-admin-body-classes-post-id.php
Created March 10, 2021 00:48
Filter WordPress Admin Body Classes and Append Post ID
<?php
add_filter( 'admin_body_class', 'dbr_mod_admin_body_class' );
/**
* Append Post ID to Admin Body Classes
*/
function dbr_mod_admin_body_class( $classes ) {
global $post;
@0aveRyan
0aveRyan / dot-scripts-theme.js
Last active January 25, 2025 20:13
Simple node rig for using code-split javscript files to generate a theme.json
#!/usr/bin/env node
const { writeFileSync } = require('fs');
const { join } = require('path');
const themeConfig = require('../.source/theme');
console.log('🧱 Building theme.json...');
try {
writeFileSync(
join(__dirname, '../theme.json'),