Skip to content

Instantly share code, notes, and snippets.

View robertdevore's full-sized avatar
🛠️
#NeverNotWorking

Robert DeVore robertdevore

🛠️
#NeverNotWorking
View GitHub Profile

Prompt:

I'm building a custom WordPress block for testimonials. I want you to write the PHP, JS, and HTML with an a11y-first approach. Assume a screen reader and keyboard-only user. Include screen reader text where appropriate, proper heading levels, semantic structure, and aria labels only if they’re absolutely necessary. Explain any a11y tradeoffs you make. Use WordPress best practices throughout.

Rules:

🔒 Prompt Template: "A11Y-First WordPress Development"
@robertdevore
robertdevore / db-version-control-fluent-forms-filter.md
Created May 28, 2025 21:08
Adding Fluent Forms data to the DB Version Control plugin export

Fluent Forms Compatibility with DB Version Control

Fluent Forms uses its own custom database tables (like wp_fluentform_forms, wp_fluentform_submissions, etc.) which are completely separate from the standard WordPress posts/meta tables that our plugin currently handles.

DB Version Control would NOT work out of the box for Fluent Forms data because it only exports:

  • WordPress posts (wp_posts)
  • Post meta (wp_postmeta)
  • WordPress options (wp_options)
  • Navigation menus
{
"profile_name": "Hyper-Real Techno-Futurist Studio Blur",
"style_manifesto": "This visual style merges cinematic studio lighting, minimalistic fashion, and surreal futuristic motion. Subjects are hyper-real, yet blurred through light trails, lens flares, and artificial depth. Every shot looks like a still from a high-concept sci-fi dream sequence, mixing precision and abstraction.",
"lighting": {
"key_light": "hard-edged frontal or upper-left with diffusion gel",
"rim_light": "split complementary tones (orange/cyan or blue/red)",
"backlight": "narrow beam spotlight with bloom",
"fill_light": "low-power edge fill on opposite side",
"motion_streak_sources": [
@robertdevore
robertdevore / uncle-bob-writing-style.json
Last active May 28, 2025 13:09
Want to write like Uncle Bob? Simply send this JSON prompt along with text describing the post you want to write to your favorite AI, and it'll handle the rest 🤘 - Example Article: https://robertdevore.com/wordpress-plugin-security-is-a-joke-and-youre-the-punchline/
{
"profile_name": "UncleBob Narrative-Tech Commentary",
"style_manifesto": "This profile captures the idiosyncratic and intellectually confrontational writing style of Uncle Bob Martin. The tone balances technical rigor with opinionated commentary, cultural references, self-aware humor, and vivid metaphors. The format blends first-person storytelling, pedagogical code exploration, sarcastic rhetorical questions, and sweeping historical or philosophical context. Content must feel simultaneously like a software war story, a tech sermon, and a late-night code rant. Above all, it should feel human, deliberate, and built to last.",
"structure": {
"intro": {
"tone": "ironic, self-aware, occasionally antagonistic",
"devices": [
"trigger warnings for the pedantic",
"quote blocks to bait or mock overly rigid readers",

📂 Project File Tree Generator

A simple Python script that generates a Markdown overview of your project’s folder structure—complete with depth control and inline includes of your README.md, package.json, and composer.json. Outputs to filetree.md, with an optional --clip flag to copy the result to your clipboard.


Features

  • Directory tree Recursively list files and folders in Markdown format.
<?php
/**
* Convert HEX color to RGBA.
*
* @param string $hex_color The HEX color code (e.g., '#FF0000').
* @param float $opacity The opacity level (0 to 1).
*
* @return string The RGBA color format.
*/
@robertdevore
robertdevore / 01-ai-content-generation-tests.md
Last active January 26, 2025 18:16
Examples of content generation with AI

AI Content Generation

Below is the prompt I gave to the various AI's

Write me a blog post about 7 security tips for wordpress developers. The tips shouldn't be your everyday run of the mill tips like 'keep plugins updated', but sshould speak to specific code updates you can make to your code. The goal of the article is to educate my readers who are WordPress developers like me, and show them how to make ttheir projects more secure.

<?php
/*
Plugin Name: BioBox
Description: A plugin that provides a BioBox widget and shortcode for author information.
Version: 1.0
Author: Your Name
Text Domain: biobox
*/
// Security measure to prevent direct access
@robertdevore
robertdevore / cache-clearer-for-wp-rocket.php
Created January 2, 2025 20:09
Auto-clear the WP Rocket cache every 5 minutes
<?php
/**
* The plugin bootstrap file
*
* @link https://freshysites.com
* @since 1.0.0
* @package Cache_Clearer_WP_Rocket
*
* @wordpress-plugin
@robertdevore
robertdevore / restrict-your-plugin-usage-on-wordpress-com.php
Created December 21, 2024 05:20
Stop your plugin from being used on websites hosted at wordpress.com
<?php
/**
* Helper function to handle WordPress.com environment checks.
*
* @param string $plugin_slug The plugin slug.
* @param string $learn_more_link The link to more information.
* @return void
*/
function wp_com_plugin_check( $plugin_slug, $learn_more_link ) {