fix: content-create with divi returns the Visual Builder edit_url (review I-1)

DiviPage::builderUrl() is shared by DiviPage::editUrl() and the content
composer, which now returns edit_url; content-create without divi keeps
the wp-admin link. divi-write-smoke checks the builder URL and, new in
section 9, the M1/M2 gates live (raw Divi markup refused; Divi read-only
stops content-create divi and execute-ability lit/divi-insert).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
2026-09-26 19:19:04 +02:00
co-authored by Claude Opus 5.5
parent 5f596b8a17
commit 4fe0810049
7 changed files with 74 additions and 9 deletions
@@ -41,7 +41,8 @@ interface ContentComposer
* lit/content-create delete the draft again.
*
* @param list<mixed> $sections
* @return array{warnings: list<string>, outline: ?string}|WP_Error
* @return array{warnings: list<string>, outline: ?string, edit_url?: string}|WP_Error edit_url: where
* the new content is edited (e.g. the Divi builder) instead of the WordPress editor.
* @throws Throwable When storing failed.
*/
public function write(int $postId, string $postType, array $sections): array|WP_Error;