fix: lit/divi-dynamic-sources offers no {{link:<ID>}} for attachments (M-9)
Also none for internal post types (post_link_url__et_pb_speculation). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -205,7 +205,14 @@ final class DiviDynamicSourcesAbility implements Ability
|
||||
return '{{post:' . $post . '}}';
|
||||
}
|
||||
|
||||
return str_starts_with($name, 'post_link_url_') ? '{{link:<ID>}}' : null;
|
||||
if (! str_starts_with($name, 'post_link_url_')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Review M-9: {{link:}} refuses attachments (status inherit); internal types ("_…") are no link targets.
|
||||
$type = substr($name, strlen('post_link_url_'));
|
||||
|
||||
return $type === 'attachment' || str_starts_with($type, '_') ? null : '{{link:<ID>}}';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user