API / Minn\Rest / BlockEditorController

BlockEditorController final readonly class

Minn\Rest\BlockEditorController · public/minn/src/Minn/Rest/BlockEditorController.php · 29 lines

Two of wp-block-editor/v1's routes, for someone who may edit theme options (probe: the block editor routes on the reference). navigation-fallback answers the navigation menu a navigation block falls back to (the newest published one, made when there is none) by its id, linked so it embeds. export is refused to anyone else as the reference refuses it; the theme it packs (the theme's files with its templates and theme.json as the site has them, as a zip) the engine does not build, so for someone allowed that route declines.

Used by 1

Constants and properties

privatereadonly Minn\Rest\RestUrl $url

Promoted from the constructor.

privatereadonly Minn\Rest\Caller $caller

Promoted from the constructor.

Public

new__construct(Minn\Rest\RestUrl $url, Minn\Rest\Caller $caller)#
methodexport(Minn\Http\Request $request): Minn\Http\ResponseGET /wp-block-editor/v1/export (cap edit_theme_options)#

The active theme packed with the site's templates and styles.

methodnavigationFallback(Minn\Http\Request $request): Minn\Http\ResponseGET /wp-block-editor/v1/navigation-fallback (cap edit_theme_options)#

The navigation menu a navigation block falls back to.