AdvancedLesson 9 of 28 · 5 steps

Review custom blocks and PHP snippets

Create a small Sandbox artifact and follow its review and activation process.

Video coming soon

Your next step is ready.

Follow the complete written guide below.
The video will join it here when it’s ready.

Start the written lesson

Before you start

  • A verified connection and a practice site.
  • Pro for custom Gutenberg blocks; PHP snippets have separate capability gates.
  • manage_options and unfiltered_html for creation/activation.

Let’s do this, step by step.

Step 01

Open the Sandbox

Open EMCP Tools → Build → Sandbox. Inspect Awaiting your review, then choose Blocks or PHP Snippets.

Open EMCP Tools, then Sandbox under Build. The overview separates Widgets, PHP Snippets and Blocks. Awaiting your review lists inactive drafts and their validation notes. Choose the type you want to create.

Step 02

Create a custom block draft

Inspect controls and validate a card specification with one root element. In 3.20, supported border, shadow, dimensions and background controls reach the frontend through native wrapper attributes. Create an inactive draft.

Ask for a small card with editable text and supported design controls. Validate it, then save an inactive draft. Keep one outer element so WordPress can apply its styles. Border, shadow, dimensions and background controls now carry through to the page. Check them in both the editor and preview.

Step 03

Or create a snippet draft

For a snippet, validate a small reviewed PHP function for a shortcode, then save it as an inactive draft.

Use a simple display example, such as the current year. Critical findings block it; warnings still deserve review. A snippet should not run just because the AI created it.

Step 04

Review and activate

Choose Review code in Awaiting your review, inspect the code drawer and report, then use the admin activation control after review. Add to a test page and compare editor and frontend.

Choose Review code and read the draft and validation notes. After review, activate it yourself in the admin. Add it to a test page, change a supported style and compare the editor with the preview. Creation and activation are separate steps.

Step 05

Export and import

Export the artifact as a bundle, import it on a practice site, and review the new inactive copy.

An imported copy needs its own review and activation. Check for existing instances before deactivating or deleting an artifact.

You’re done when…

The reviewed artifact works on a test page and imported copies remain subject to review.

Keep the reference handy.

The docs cover tool details and requirements for this lesson.

Your EMCP guide

Answers from our docs

YOUR CHAT, YOUR CHOICE

Before we chat

MSR Builds processes your question and up to four recent messages on our server to answer from the EMCP docs. AI is optional and needs your separate permission.

The chat is kept in this page's memory, not saved as a conversation in our database or browser storage. Our hosting and security services process connection information, such as your IP address, to prevent abuse.

Cloudflare Turnstile checks your browser and connection to prevent automated abuse when you send a question. No login is required.

Please leave out personal, sensitive or confidential information, passwords and API keys.

You can withdraw consent and clear this page's chat at any time. This cannot undo a request already sent or erase provider/security records.

Chat privacy, retention & your rights ↗ · Privacy contact

Starting chat consents to this processing. You can browse our docs without using the chat.