Code Engine – PHP Snippets, AI Functions & Automation for WordPress
Code Engine is a snippets manager that doesn’t stop at snippets. Yes, it runs your PHP and JavaScript exactly where and when you want: frontend, backend, on a schedule, or inside your content. But its real magic is what happens after you write a function: the same little piece of code instantly becomes a tool your AI chatbots can call, a step you can drag into a visual workflow, and an endpoint the outside world can trigger. One function, three superpowers. Most “code snippets” plugins stop at a textarea and a toggle. Code Engine treats your functions as first-class building blocks for the whole Meow Apps ecosystem, and for anything that can speak REST. Think out of the box, let your creativity flow, because the possibilities really are endless! ✨ For more, check the official website and come say hi on the Discord. Quick Intro Hello! ☀️ I built Code Engine because I was tired of pasting mystery snippets into functions.php and praying. I wanted a place where small bits of code are organized, safe, AI-assisted, and reusable everywhere. Here’s the idea. You write a function (or let the AI write it for you from a plain-English description). That function immediately shows up in three places: AI Engine: your chatbots and MCP clients (Claude, ChatGPT, Claude Code) can call it as a tool, with real arguments. Ask “how many orders shipped today?” and your chatbot runs your function to answer. Workflow Engine: your function appears in the step picker as its very own block. Drag it onto the canvas, wire it between an AI step and a Slack step, done. No glue code. REST / External tools: give it a secure endpoint and a token, then trigger it from Make.com, n8n, Zapier, a cron job, or a webhook. You never wrote an “integration.” You just wrote a function. Code Engine did the rest. 🤝 Core Modules 🧩 Snippets Manager Backend, Frontend, Persistent, Scheduled, Functions, and in-content (PHP/JS) snippets, all in one clean dashboard with tags, search, scope filters, and priorities. 🪄 AI-Assisted Coding Describe what you want in plain English and let AI Engine write the snippet: code, name, arguments, and scope included. Refine existing code or implement it straight from your comments. 🤖 Functions as AI Tools Every Function snippet becomes a function-calling tool and an MCP tool, so your AI Engine chatbots (and external AI agents) can actually do things on your site, not just talk. 🔀 Functions as Workflow Steps Workflow Engine surfaces each of your functions as its own draggable step. Your custom logic becomes a first-class citizen on the automation canvas. 🌐 External Access (REST) Expose any runnable snippet through a secured REST endpoint with a bearer token. Perfect for Make.com, n8n, webhooks, and scheduled external jobs. 🛡️ Safe Mode A snippet that throws a fatal error is automatically caught and disabled before it can take your site down. Code with confidence. ⏰ Scheduling Run a snippet daily at a chosen time via WP-Cron (reports, cleanups, syncs) without touching the server crontab. 🧱 Code Blocks & Shortcodes (Pro) Drop PHP or JS straight into a post or page with a Gutenberg block or the [code-engine] shortcode, with safety guards. 🧩 Snippets, the way they should be Code Engine organizes your code by scope, so each snippet runs exactly where it belongs: Persistent: runs everywhere (frontend and backend). Your everyday “add this to functions.php” code, but managed. Frontend: runs only on the public site. Backend: runs only in the admin. Function: a named, callable function with typed arguments and defaults. This is the reusable building block (see below). Scheduled: runs on a WP-Cron schedule, at the hour and minute you pick. Content (PHP / JS): runs inside a specific post or page, via a Gutenberg Code Block or the [code-engine] shortcode (Pro). Everything is searchable, taggable, sortable by priority, and importable/exportable. The CodeMirror editor gives you proper syntax highlighting and keyboard shortcuts (Cmd+S to save, Cmd+Enter to run). A nikic/php-parser pass validates your PHP before it ever runs. 🪄 Let AI write it for you Don’t feel like writing the boilerplate? Describe the snippet in plain language and Code Engine, powered by AI Engine, generates the whole thing: the code, a sensible name, a description, the right scope, and, for functions, the argument list with names, types, and defaults. Already have code? Ask the AI to modify it from a prompt, or write a few comments describing what you want and let it fill in the implementation. It’s pair programming, right inside your dashboard. ✨ The big idea: write once, use everywhere This is what makes Code Engine different. A Function snippet is not just code you call from other code. It’s a reusable capability that the rest of your stack can plug into. The moment you save it, the same function is available in three places at once: 1. As an AI tool, for chatbots and AI agents With AI Engine active, your functions are exposed through function calling and over MCP (Model Context Protocol). Your on-site chatbot can run them mid-conversation, and external AI agents (Claude, Claude Code, ChatGPT, OpenClaw) can call them too. Want a chatbot that checks stock, looks up a booking, or kicks off a process? Write the function; the chatbot gains the skill. 2. As a workflow step, for automation With Workflow Engine, every active function shows up in the Add-step picker as its own block, named after your snippet, with one input per argument. Drag it onto the canvas and wire it between other steps: an AI step that summarizes, your function that saves, a Social Engine step that posts. There’s also a generic “Execute snippet (by ID / by name)” step when you want to call one dynamically. You never write integration code; your function is the integration. 3. As a REST endpoint, for the outside world Give a snippet a custom endpoint name and a bearer token, and it’s instantly callable from anywhere: POST /wp-json/code-engine/v1/snippets-endpoint/your-endpoint Pass arguments as JSON in the body, secure it with a token, and trigger it from Make.com, n8n, Zapier, GitHub Actions, or a humble cron job. Automation without a middleware bill. 🛡️ Safe by default Running arbitrary code is powerful, so Code Engine takes safety seriously: Safe Mode catches fatal errors and auto-disables the offending snippet, so a typo never white-screens your site. REST whitelisting means global snippets only run on trusted REST routes by default, so you choose what to open up. Per-snippet tokens secure your external endpoints. Validation with a real PHP parser before code is saved. For developers who want fewer guardrails, there’s a “Bypass REST Security” option and filters (mwcode_rest_authorized, mwcode_rest_whitelist) to tailor exactly what’s allowed. Works beautifully with the Meow Apps family Code Engine is one engine in a connected set, each one useful alone, magical together: AI Engine: chatbots, content generation, and MCP. Turns your functions into AI tools. Workflow Engine: visual automation. Turns your functions into draggable steps. SEO Engine: smart, lightweight AI SEO. Social Engine: schedule and automate social posts. Why Code Engine? Reusable, not throwaway Other snippet plugins give you a place to paste code. Code Engine gives you a place to build capabilities that your AI, your workflows, and your external tools can all use. Native to WordPress Clean, fast, and built the WordPress way. No clunky external dashboards, no bloat. AI-native Write snippets with AI, expose them to AI. The whole loop lives in your wp-admin. Developer friendly REST API, MCP tools, function calling, scheduling, import/export, and plenty of filters to hook into. Cared for Part of the Meow Apps family, with regular updates and a real human behind it. 💕
Top keywords
- code32×2.48%
- engine25×1.94%
- ai22×1.71%
- function18×1.40%
- rest13×1.01%
- snippet13×1.01%
- code engine11×0.85%
- functions11×0.85%
- write10×0.78%
- runs9×0.70%
- snippets9×0.70%
- step9×0.70%
Query All The Post Types
Query All The Post Types is a lightweight developer tool that auto-detects every registered post type on your WordPress site and displays comprehensive information about each one. Post types are automatically grouped by origin. No configuration required. WooCommerce store owners: All of your core WooCommerce post types (products, orders, coupons, subscriptions, etc.) are grouped in a dedicated WooCommerce tab for easy access. Developers and AI users: As of version 2.1, Query All The Post Types now registers every post type as a discoverable entry in the WordPress Abilities API introduced in WordPress 6.9. Any authenticated tool, such as an MCP client, an AI assistant, or a custom admin dashboard, can query your site and get a complete, structured inventory of every post type, what it supports, and how it’s configured. As of version 2.2, QATP includes a built-in API Explorer so you can browse, query, and share your site’s post type data directly from the WordPress admin without writing any code. Which makes building Custom Post Types easier and verifying the production site has all of the data needed. Features Auto-Detection – Discovers all post types registered by WordPress core, plugins, and themes Tabbed Interface – Post types organized into logical groups for easy navigation. Comprehensive Data – View all registration settings, REST API config, supports, taxonomies, and labels REST API Links – Clickable endpoint URLs for post types exposed to the REST API WooCommerce Tab – Dedicated purple tab groups all your WooCommerce post types (products, orders, coupons, and more) Quick Actions – View All and Add New buttons for post types with admin UI WordPress Abilities API – Every post type registered as a machine-readable ability (WordPress 6.9+) API Explorer – Browse, query, and copy commands for any post type directly from the admin (version 2.2+) Post Type Groups WordPress Core – Public – Built-in types with a UI (post, page, attachment) WordPress Core – Internal – Built-in types without a UI (revision, nav_menu_item, wp_template, etc.) WooCommerce – Products, orders, coupons, subscriptions, and more (when active) Advanced Custom Fields / ACF Pro – Field groups, post types, taxonomies, and options pages (when active) Elementor – Elementor library, floating buttons, and component types (when active) LearnDash – Courses, lessons, topics, quizzes, assignments, and more (when active) BuddyPress – Groups, member types, and email types (when active) GiveWP – Donation forms and payment types (when active) Easy Digital Downloads – Downloads and EDD-registered types (when active) AppPresser – Push notification and log types (when active) Plugin/Theme – Public – Custom post types from any other plugin or theme, with a public UI Plugin/Theme – Internal – Custom post types from any other plugin or theme, without a public UI Data Displayed Per Post Type Slug, description, and all boolean settings Public, publicly queryable, show UI, show in nav menus, show in admin bar REST API: show in REST, REST base, REST namespace, REST controller class Has archive, exclude from search, capability type, map meta cap Hierarchical, rewrite rules, query var, menu position, menu icon Can export, delete with user Supported features (title, editor, thumbnail, excerpt, comments, etc.) Associated taxonomies with admin links All registered labels (expandable section) REST API endpoint URL (clickable) WordPress Abilities API Starting in version 2.1, QATP registers every post type as a WordPress Ability: a machine-readable declaration that authenticated tools can query via the REST API. This feature requires WordPress 6.9 or later. On older versions, QATP continues to work normally and the Abilities API integration is silently skipped. What gets registered Each post type is registered as an ability under the qatp/ namespace. For example with WordPress Core, qatp/post, qatp/product, qatp/page. Abilities are grouped into categories matching the tabs you see in the admin UI: qatp-core-public, qatp-core-internal, qatp-woocommerce, and so on. Running an ability returns a structured data object for that post type: slug – the registered post type name label – plural label (e.g. “Posts”) singular – singular label (e.g. “Post”) public, show_ui, show_in_rest, hierarchical – boolean flags rest_base – the REST API base URL segment supports – array of supported features (title, editor, thumbnail, etc.) taxonomies – array of associated taxonomy slugs Who can access it Access requires the manage_options capability, meaning site administrators only. This is intentional. Post type registration data can reveal details about your site’s plugin stack and data architecture. It is not exposed publicly. API Explorer The API Explorer is a built-in interface for browsing and querying your site’s WordPress Abilities directly from the admin. It is available as of version 2.2. To open it, go to Tools > Query Post Types and click API Explorer in the toggle at the top right of the page. How it works When you open the Explorer, you see a row of pills across the top. Each pill represents an ecosystem on your site: WooCommerce, LearnDash, GiveWP, core WordPress types, and so on. Click a pill to filter the results to that group. Click All to see everything. Below the pills, each post type on your site appears as a card. The card shows the ability name, the label, and which ecosystem it belongs to. Click a card to select it. A Run button appears below the cards and Command Reference. Click Run button to fetch the live data for that ability and see the full JSON response displayed below. The Command Reference Every time you select a card and run an ability, the Command Reference panel updates automatically. It shows you three ways to fetch that same data yourself: REST URL – a clickable link you can open directly in your browser while logged in as an admin WP-CLI – a ready-to-copy WP-CLI command that runs the same request from the terminal, authenticated as your current user account curl – a curl command using Application Password authentication that works from any terminal or HTTP client REST URL example: https://yoursite.com/wp-json/wp-abilities/v1/abilities/qatp/post/run?_wpnonce=abc123 The nonce is generated automatically and appended to the URL. The link works in your browser as long as you are logged in as an admin. WP-CLI example: wp --user=1 eval 'print_r(rest_do_request(new WP_REST_Request("GET", "/wp-abilities/v1/abilities/qatp/post/run")));' The --user= flag is automatically set to your current WordPress user ID. You do not need to edit the command. curl example: curl -s -u "admin:application_password" "https://yoursite.com/wp-json/wp-abilities/v1/abilities/qatp/post/run" Replace admin with your WordPress username and application_password with an Application Password generated from your profile. See the Application Passwords section below. Application Passwords for curl The curl command in the Command Reference uses Application Password authentication. Application Passwords are a built-in WordPress feature (available since WordPress 5.6) that let external tools authenticate with the REST API without using your main account password. To generate an Application Password: Go to Users > Your Profile in your WordPress admin Scroll down to the Application Passwords section Enter a name for the password (e.g. “QATP curl”) Click Add New Application Password Copy the generated password immediately. WordPress does not show it again. Use the generated password in place of application_password in the curl command. Spaces in the generated password are fine — you can include them as-is or remove them. Note: The X-WP-Nonce authentication approach used in some WordPress tutorials only works when a browser session cookie is also present. It does not work for standalone curl requests from a terminal. Application Passwords are the correct approach for curl and all external HTTP clients. Selecting multiple post types You can select more than one card at a time. Click additional cards to add them to your selection. A bar appears above the results showing how many abilities you have selected, with a Clear button to start over. When you have two or more abilities selected, the Command Reference updates to show one curl command per selected ability, stacked together. This gives you a ready-made set of commands you can run in sequence to pull data for all your selected post types at once. Click Run All to fetch all selected abilities at once and see their responses stacked in the drilldown panel. This is useful when you want to compare post type configurations side by side. You can mix and match across ecosystems. Select a LearnDash course, a GiveWP form, and a WooCommerce product all at the same time to get the commands for all three in one block. Shareable links The URL in your browser updates as you make selections. If you are in Explorer mode with abilities selected, the URL encodes that state using a hash fragment: https://yoursite.com/wp-admin/tools.php?page=query-all-the-post-types#mode=explorer&abilities=qatp/product,qatp/course Copy and paste the URL into Slack, an email, or a document. Anyone with admin access on that site can open it and land in the exact same view, with the same abilities selected and the Command Reference already populated. The back button also works as expected. Navigate to a previous selection by pressing back, just like any other page. Giving the Explorer output to Claude The API Explorer is designed to work with AI assistants. Copy the curl commands from the Command Reference and paste them into a conversation with Claude. Claude can read the JSON responses and use them to understand your site’s post type structure, answer questions about your data architecture, or help you write code that works with your specific setup. You can also share the URL directly. A URL with abilities pre-selected is a compact way to give someone, or an AI tool, a pointer to exactly what you want them to look at. How to browse without the Explorer In your browser: Go to Tools > Query Post Types in your WordPress admin. The sidebar shows a Browse Abilities API button. Click it and it opens the endpoint in a new tab with authentication already handled. Install a JSON Formatter browser extension (available for Chrome and Firefox) to make the output readable. Note: visiting the endpoint URL directly in your browser without clicking the button will return a 401 error. The WordPress REST API requires a valid nonce for cookie-authenticated requests. The button generates one automatically. With WP-CLI: See all QATP abilities and their descriptions: wp --url=https://yoursite.com --user=1 eval '$r = rest_do_request(new WP_REST_Request("GET", "/wp-abilities/v1/abilities")); $qatp = array_filter($r->get_data(), fn($a) => strpos($a["name"], "qatp/") === 0); foreach ($qatp as $a) { echo $a["name"] . "\n " . $a["label"] . " - " . $a["description"] . "\n"; }' Run a specific ability to get full structured data: wp --url=https://yoursite.com --user=1 eval '$r = rest_do_request(new WP_REST_Request("GET", "/wp-abilities/v1/abilities/qatp/post/run")); echo json_encode($r->get_data(), JSON_PRETTY_PRINT);' Replace --user=1 with the ID of any administrator account on your site if user ID 1 is not an admin. With curl: List all QATP abilities: curl -s -u "admin:application_password" "https://yoursite.com/wp-json/wp-abilities/v1/abilities?category=qatp-core-public" Run a specific ability: curl -s -u "admin:application_password" "https://yoursite.com/wp-json/wp-abilities/v1/abilities/qatp/post/run" With Postman or any REST client: Create an Application Password in your WordPress admin under Users > Your Profile > Application Passwords. Use HTTP Basic Auth with your username and the generated password. Send a GET request to https://yoursite.com/wp-json/wp-abilities/v1/abilities.