Skip to content

Instantly share code, notes, and snippets.

View juanmaguitar's full-sized avatar

JuanMa juanmaguitar

View GitHub Profile
@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 );
@juanmaguitar
juanmaguitar / ai-wordpress-october-2025.md
Last active October 13, 2025 15:32
State of Artificial Intelligence Integration in WordPress (October 2025)
@juanmaguitar
juanmaguitar / ai-wp-october-2025.md
Last active October 13, 2025 16:46
Estado de la Integración de la Inteligencia Artificial en WordPress (Octubre 2025)
@juanmaguitar
juanmaguitar / preply-lessons-2025.md
Last active October 6, 2025 11:09
Preply Lessons Notes 2025

2025

🗓️ Monday, 6 October 2025 at 08:30

💬 Vocabulary / Expressions

“Further” — means more or to a greater degree. It’s often used in more formal English.

  • Distance: “This is further away than that.” → Describes something that’s at a greater physical distance.
  • Degree or detail: “Let’s discuss this in further detail.” → Means in more depth or more precisely.