feat: {{link:ID}} placeholder via Divi's post_link_url dynamic content
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ namespace LIT\MCP\Tests\Support;
|
||||
|
||||
use LIT\MCP\Integrations\Divi\Compose\AttrWriter;
|
||||
use LIT\MCP\Integrations\Divi\Compose\Composer;
|
||||
use LIT\MCP\Integrations\Divi\Compose\LinkTargets;
|
||||
use LIT\MCP\Integrations\Divi\Compose\MediaResolver;
|
||||
use LIT\MCP\Integrations\Divi\Compose\Placeholders;
|
||||
use LIT\MCP\Integrations\Divi\Compose\ShortformWriter;
|
||||
@@ -128,9 +129,24 @@ final class ComposeFixture
|
||||
};
|
||||
}
|
||||
|
||||
/** Link targets of the tests: 839 is a page, 840 a post; everything else is missing, trashed or unreadable. */
|
||||
public static function links(): LinkTargets
|
||||
{
|
||||
return new class implements LinkTargets {
|
||||
public function postTypeOf(int $id): ?string
|
||||
{
|
||||
return match ($id) {
|
||||
839 => 'page',
|
||||
840 => 'post',
|
||||
default => null,
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public static function placeholders(): Placeholders
|
||||
{
|
||||
return new Placeholders(DiviFixtures::designSystem());
|
||||
return new Placeholders(DiviFixtures::designSystem(), self::links());
|
||||
}
|
||||
|
||||
/** The strict $variable(…)$ checker for the sample design system and the default map. */
|
||||
|
||||
Reference in New Issue
Block a user