| 开发者 | TigrouMeow |
|---|---|
| 更新时间 | 2026年7月18日 09:52 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
code-engine to the /wp-content/plugins/ directory (or install it from the Plugins screen).A regular snippet (Persistent, Frontend, Backend, Scheduled, Content) runs automatically based on its scope. A Function is a named, callable snippet with arguments. It runs on demand, and that's exactly what makes it reusable as an AI tool, a workflow step, or a REST endpoint.
No. Code Engine is a fully capable snippets manager on its own. AI Engine unlocks AI-assisted writing and exposes your functions as AI tools; Workflow Engine turns your functions into visual steps. Each is optional, but together they're where the fun begins. 😊
With AI Engine active, Code Engine registers your functions through function calling and MCP. Your on-site chatbots can call them, and external AI agents (Claude, Claude Code, ChatGPT, OpenClaw) can too. Each argument you declare becomes a parameter the AI can fill in.
Give the snippet a custom endpoint name and a token, then send a request to /wp-json/code-engine/v1/snippets-endpoint/your-endpoint with your arguments as JSON. By default, global snippets only run on whitelisted REST routes for safety. You can adjust this in Settings or with the mwcode_rest_whitelist and mwcode_rest_authorized filters.
Code Engine includes Safe Mode, which catches fatal errors and automatically disables the snippet that caused them, so a mistake won't bring your site down. PHP is also validated with a real parser before it's saved. As always, only run code you understand and trust.
Yes. Use the Scheduled scope and pick an hour and minute; Code Engine runs it daily via WP-Cron, great for reports, cleanups, and syncs.
Yes. Code Engine supports importing and exporting your snippets and settings, so you can back them up or move them to another site.
{prefix}_allow_setup filter, allowing other roles to be granted access.