fix: full-form internal links follow the {{link:}} target rules (ruling P10)

One PostIdParser for {{link:}} and select_post; post_link_url_<type> needs a
living, readable, non-attachment target of exactly that type.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-27 14:54:51 +02:00
co-authored by Claude Opus 5.5
parent c615522cf6
commit 06f13799de
14 changed files with 229 additions and 28 deletions
@@ -48,4 +48,9 @@ final class WpValueSanitizer implements ValueSanitizer
{
return current_user_can('read_post', $id);
}
public function linkTargetType(int $id): ?string
{
return (new WpLinkTargets())->postTypeOf($id);
}
}