{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigfeqeyx5tg2egic4q2a4uy3brd5q7gjsao5mc64pem3urkuqm5ly",
    "uri": "at://did:plc:svkyjirwpd7ts4qgnzoqfcc2/app.bsky.feed.post/3moih375i56mx"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreig246uloutolstlrmx6wye3e2b2g536dpiovdv6grwddgtiaaqr6a"
    },
    "mimeType": "image/png",
    "size": 60929
  },
  "description": "I’ve been working on WordPress since the Friends era, so I’ve built up quite the graveyard of projects - and decided to see if AI could bring one back to life.",
  "path": "/2025/10/31/%f0%9f%a7%9f%e2%99%80%ef%b8%8f-digging-up-the-past-%f0%9f%a7%9f/",
  "publishedAt": "2025-10-31T14:13:15.000Z",
  "site": "at://did:plc:svkyjirwpd7ts4qgnzoqfcc2/site.standard.publication/3mhpwfentz6lr",
  "tags": [
    "Code"
  ],
  "textContent": "Un-deading Old Plugins via AI I’ve been working on WordPress for a long time – long enough that Friends was still on TV. So I’ve built up quite the graveyard of project files. Most of my projects are mainly HTML/CSS with a bit of JavaScript, so they zip up neatly… as long as I remember to remove node_modules. Over the years I’ve amassed around 200+ projects including WordPress custom themes and plugins – including my first theme from 2004, which looked something like this: index.php comments.php screenshot.png searchform.php style.css …and not much else (when did functions.php become a thing anyway?) One of the more interesting plugins I worked on was for WikiTribune, a news style wiki founded by Jimmy Wales and built on WordPress. The idea was to mimic Wikipedia’s publishing process – where you can lock versions of a page at different points in time. For example, if a page becomes contentious, you might freeze a “clean” version, or allow collaborative editing behind the scenes without affecting the live post. WordPress doesn’t natively support this – once something is published, all new edits appear on the live version. There’s no concept of a “draft published” state. So, via a company called Fabrica (now Yes We Work), we developed a plugin called Fabrica Pending Revisions. It worked by storing each post’s “accepted revision” as a hidden meta field to track which version was currently live. The README on GitHub has all the details. But this was back in 2018, and then… Gutenberg happened. Needless to say, it didn’t play nicely anymore. Refactoring with AI I always liked the concept, clients often ask for similar functionality, but I’d never had the time to rebuild it. Recently, after experimenting with Claude Code and its agentic approach, I realised “pending revisions” would be an interesting candidate for a modern refactor. My goal was to update it for a Gutenberg-era workflow that still offered the same functionality. It started well. The AI built some tidy TypeScript blocks for sidebar revision management. It looked great within the Post/Page editor sidebar. It didn’t work.After several iterations I had to abandon that version. But the AI had produced a working PHP-based sidebar page for managing revisions, so I told it to analyse that method. The result: working meta boxes on the post edit screen for revision management. Functional, but not elegant. That bothered me. If I’m using AI-powered development, I want to learn something from it — not just get working code. I’ve tinkered with @wordpress/scripts, @wordpress/blocks, and some basic block variations and build pipelines before. I’m not a TypeScript or React developer, and I don’t plan to become one, but I wanted to understand more. So I moved to V2. Using version one as a guide, I asked Claude to build a modern version using @wordpress/scripts. Then I inspected the code – old-school “View Source” style — to see how it worked. It was much faster than wading through verbose docs just to get a small piece working. The first iteration was decent, but buggy: saving issues, duplicated revisions, weird update logic. AI gets into cul-de-sacs. A lot. Still, it got about 80% there on the first try. After that, I dove into the code myself, adding pseudo-code suggestions in prompts to help fix things. I even made it run its own security audit (“oh yeah, there’s this massive security hole I created – better patch it!”). It Lives! Eventually, it worked. Probably not something I’ll actually use, but it was fun to bring it back to life.",
  "title": "🧟‍♀️ Digging up the past 🧟",
  "updatedAt": "2025-10-31T14:14:43.000Z"
}