Skip to content

Instantly share code, notes, and snippets.

View juanmaguitar's full-sized avatar

JuanMa juanmaguitar

View GitHub Profile
@juanmaguitar
juanmaguitar / wordpress-trac-keywords-guide.md
Last active January 20, 2026 21:30
Complete WordPress Trac Keywords Guide - Meanings and Usage

Complete WordPress Trac Keyword Guide

A comprehensive guide to all WordPress Trac issue labels/keywords, their meanings, and when to use them.

Overview

WordPress Trac keywords are not like generic tags on a blog post. They are a defined list of keywords that describe a ticket's current status in the development workflow and are used to build important reports. All keywords belong to one of two groups: status-based and action-based.

Typical Workflow Progression

@juanmaguitar
juanmaguitar / wordpress-trac-svn-explanation.md
Created January 20, 2026 17:24
Why WordPress Uses Trac and SVN Instead of GitHub

Why Does WordPress Use Trac and SVN Instead of GitHub?

Great question! WordPress's use of Trac and SVN is rooted in history and practicality, though it creates an interesting split with Gutenberg's GitHub-first approach. Here's the full picture:

Historical Context

WordPress has been using Trac since at least 2004 and Subversion (SVN) as its version control system since early in the project's history. These tools were industry standards when WordPress adopted them, and Trac was specifically designed to integrate tightly with SVN.

Why WordPress STILL Uses Trac & SVN (2024-2026)

@juanmaguitar
juanmaguitar / blueprint-w-skill.json
Last active January 16, 2026 17:40
Blueprint creados con y sin skills (playground expert)
{
"preferredVersions": {
"php": "8.3",
"wp": "latest"
},
"features": {
"networking": true
},
"landingPage": "/wp-admin/",
"login": true,
@juanmaguitar
juanmaguitar / test-reports-blueprint.json
Created January 15, 2026 13:14
WordPress Playground Blueprint for test-reports plugin
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "/wp-admin/admin.php?page=test-reports",
"preferredVersions": {
"php": "8.0",
"wp": "latest"
},
"steps": [
{
"step": "login",
// ============================================
// DETECTING SIDEBAR STATE
// ============================================
// Get currently active sidebar
wp.data.select('core/interface').getActiveComplementaryArea('core')
// Returns: 'edit-post/document', 'edit-post/block', null, etc.
// Check if document sidebar is open
wp.data.select('core/interface').getActiveComplementaryArea('core') === 'edit-post/document'
@juanmaguitar
juanmaguitar / new-command.js
Last active December 1, 2025 15:49
New Command Palette
wp.data.dispatch( wp.commands.store ).registerCommand( {
name: 'myplugin/my-web-command-name',
label: 'Go to juanma.codes',
callback: ( { close } ) => {
document.location.href = 'http://juanma.codes';
close();
},
} );
const { getBlockTypes, getBlockVariations } = wp.data.select('core/blocks');
getBlockTypes()
.filter(({ name }) => getBlockVariations(name).length)
.map(({ name }) => ({ [name]: getBlockVariations(name) }));
wp.data
.select('core/blocks')
.getBlockTypes()
.filter(({ name }) => !name.includes('core/'));
⬢  wp shell

wp> foreach ( wp_get_abilities() as $a ) echo $a->get_name() . "\n";

  core/get-site-info
  core/get-environment-info
  site/site-info
  list-all-urls/urls
// Helper: wait for all records of a given post type.
const getTypes = async ( types ) => {
return await Promise.all(
types.map(
( type ) =>
new Promise( ( resolve ) => {
const unsub = wp.data.subscribe( () => {
const items = wp.data
.select( 'core' )
.getEntityRecords( 'postType', type );