Skip to content

Instantly share code, notes, and snippets.

View getdave's full-sized avatar

Dave Smith getdave

View GitHub Profile
@getdave
getdave / test-playground.json
Created January 30, 2026 10:46
Navigation Block with Hash Links & Customizable Overlays Experiment
{
"meta": {
"title": "Navigation Block with Hash Links & Customizable Overlays Experiment",
"description": "Testing Navigation Block with Hash Links with Gutenberg Customizable Navigation Overlays experiment enabled",
"author": "automattic"
},
"landingPage": "/wp-admin/site-editor.php?p=%2Fwp_template_part%2Ftwentytwentyfive%2F%2Fheader&canvas=edit&focusMode=true",
"steps": [
{
"step": "runPHP",
@getdave
getdave / temp-nav-overlay-test-blueprint.json
Created January 28, 2026 16:13
Navigation Block Test with Nested Items
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"meta": {
"title": "Navigation Block with Hash Links & Customizable Overlays Experiment",
"description": "Testing Navigation Block with Hash Links with Gutenberg Customizable Navigation Overlays experiment enabled",
"author": "automattic"
},
"landingPage": "/wp-admin/site-editor.php?canvas=edit",
"preferredVersions": {
"php": "latest",
@getdave
getdave / merged-blueprint.json
Last active January 28, 2026 14:01
Navigation Block Hash Links Testing with Customizable Overlays Experiment Enabled
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"meta": {
"title": "Navigation Block with Hash Links & Customizable Overlays Experiment",
"description": "Testing Navigation Block with Hash Links with Gutenberg Customizable Navigation Overlays experiment enabled",
"author": "automattic"
},
"landingPage": "/wp-admin/site-editor.php?canvas=edit",
"preferredVersions": {
"php": "8.3",
@getdave
getdave / gist:87ed3f6b18165404b6a893fa88c39845
Last active October 7, 2025 13:26
Blueprint Nav Overlay Anchor Testing
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"meta": {
"title": "Navigation Block with Hash Links",
"description": "Testing Navigation Block with Hash Links",
"author": "automattic"
},
"landingPage": "/wp-admin/site-editor.php?canvas=edit",
"preferredVersions": {
"php": "8.3",
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->
<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
@getdave
getdave / gist:3fb8a7d6253c2cbbd022302cc2847f3b
Last active September 24, 2025 13:32
Nav Testing Blueprint
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"meta": {
"title": "Navigation Block Simplified Editing",
"description": "Testing Nav",
"author": "automattic"
},
"landingPage": "/wp-admin/site-editor.php?canvas=edit",
"preferredVersions": {
"php": "8.3",
@getdave
getdave / gist:320a662fd94c9f70408e267a7bc3ffc8
Last active September 24, 2025 08:55
WP Testing Import
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->
<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
@getdave
getdave / book-review-pattern.php
Created October 24, 2022 10:23
Post Type Pattern in Gutenberg block editor WordPress
<?php
/**
* Title: Book Review
* Slug: twentytwentythree/book-review
* Categories: query
* Keywords: post meta
* Block Types: core/post-content
* Post Types: book
*/
?>
@getdave
getdave / imagesizes-wordpress-block-editor.js
Created October 20, 2022 12:19
Get registered image sizes in the WordPress block editor
import {store as blockEditorStore } from '@wordpress/block-editor';
import { useSelect } from "@wordpress/data";
// Inside component
const {sizes} = useSelect((select) => {
const { getSettings } = select(blockEditorStore);
const settings = getSettings();
const sizes = settings?.imageEditing?.imageSizes;
@getdave
getdave / gitrebasebranch.sh
Created March 22, 2021 11:06 — forked from aduth/gitrebasebranch.sh
Git - Interactive rebase against own merge base
#!/bin/bash
git rebase -i $(git merge-base HEAD master)