Skip to content

Instantly share code, notes, and snippets.

View juanmaguitar's full-sized avatar

JuanMa juanmaguitar

View GitHub Profile
// 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.
@juanmaguitar
juanmaguitar / index.js
Created August 7, 2024 06:19
MIddleware to log actions gutenberg stores - packages/data/src/redux-store/index.js
// #region loggerMiddleware
const loggerMiddleware = ( optionsLogger ) => ( store ) => ( next ) => {
const actions = [];
return ( action ) => {
const { whatToLog, storeName, storesToLog } = optionsLogger;
if ( storesToLog.includes( storeName ) ) {
if ( whatToLog.includes( 'action' ) ) {
console.log( { storeName, ...action } );
}
if ( whatToLog.includes( 'prevState' ) ) {
<?php
/**
* Plugin Name: Beginner Friendly Playground
* Description: Disables everything that's not really valuable for a first time explorer.
* Version: 0.1.0
* Requires at least: 6.5
*/
defined( 'ABSPATH' ) || exit;
@juanmaguitar
juanmaguitar / __experimental-block-json,txt
Last active April 28, 2023 20:40
use of __experimental in Gutenberg
⬢ gutenberg  trunk ⦾ grep -Rinw . -e '__experimental.*' --include=\block.json
./packages/block-library/src/read-more/block.json:28: "__experimentalFontFamily": true,
./packages/block-library/src/read-more/block.json:29: "__experimentalFontWeight": true,
./packages/block-library/src/read-more/block.json:30: "__experimentalFontStyle": true,
./packages/block-library/src/read-more/block.json:31: "__experimentalTextTransform": true,
./packages/block-library/src/read-more/block.json:32: "__experimentalLetterSpacing": true,
./packages/block-library/src/read-more/block.json:33: "__experimentalTextDecoration": true,
./packages/block-library/src/read-more/block.json:34: "__experimentalDefaultControls": {
./packages/block-library/src/read-more/block.json:42: "__experimentalDefaultControls": {
./packages/block-library/src/read-more/block.json:46: "__experimentalBorder": {
⬢ gutenberg trunk ⦾ grep -Rinw . -e 'new CLIError' --exclude=\*.test.js --exclude=\*npm.js --exclude=\*.json
./packages/create-block/lib/templates.js:106: throw new CLIError( 'Template found but invalid definition provided.' );
./packages/create-block/lib/templates.js:132: throw new CLIError(
./packages/create-block/lib/templates.js:139: throw new CLIError(
./packages/create-block/lib/templates.js:170: throw new CLIError(