GlobalStylesObject final readonly class
Minn\Rest\GlobalStylesObject · public/minn/src/Minn/Rest/GlobalStylesObject.php · 87 lines
The wp/v2/global-styles item, theme, and revision shapes.
Constants and properties
| private | readonly Minn\Content\Revisions $revisions | Promoted from the constructor. |
| private | readonly Minn\Rest\RestUrl $url | Promoted from the constructor. |
| private | readonly Minn\Rest\Caller $caller | Promoted from the constructor. |
Public
| new | __construct(Minn\Content\Revisions $revisions, Minn\Rest\RestUrl $url, Minn\Rest\Caller $caller)# | |
| method | item(Minn\Content\PostRecord $post, Minn\Rest\Context $context): array# | The saved styles: the title both ways, settings by origin, styles with their presets resolved, the links; in editing context the app's lock fields too, which a global-styles post never carries. |
| method | theme(array $settings, array $styles, string $stylesheet): array# | The active theme's own styles as the themes/{stylesheet} route answers them. |
| method | revision(Minn\Content\PostRecord $revision): array# | One revision row: both nodes when the body holds anything at all, neither when it is blank, then the row's own facts; no links. |
Internals 2
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
Nothing matches.