fix: library IDs stay hidden without library access (ruling P13)
Outline, node-get, write outlines, the render summary and replace-text's opaque-node match name no library ID unless the library group is visible and the user has divi_library; read-only still names them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,8 +23,11 @@ final class Outline
|
||||
|
||||
private bool $truncated = false;
|
||||
|
||||
/** @param array<string, string> $presetNames Preset ID => name. */
|
||||
public function __construct(private array $presetNames = [])
|
||||
/**
|
||||
* @param array<string, string> $presetNames Preset ID => name.
|
||||
* @param bool $globalIds Ruling P13: false leaves out the library IDs of global instances.
|
||||
*/
|
||||
public function __construct(private array $presetNames = [], private bool $globalIds = true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -157,7 +160,7 @@ final class Outline
|
||||
'editable' => $editable,
|
||||
'depth' => $depth,
|
||||
'truncated' => false,
|
||||
'global_id' => $global['id'] ?? null,
|
||||
'global_id' => $this->globalIds ? ($global['id'] ?? null) : null,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user