From e11cdede0bb94b4c871f0e07c4aeb7d8c7c2685c Mon Sep 17 00:00:00 2001 From: Steve Ross Date: Thu, 18 Dec 2025 10:59:25 +0000 Subject: [PATCH] setup endpoints class and add container widths for blocks --- web/app/themes/badegg/app/API/Admin.php | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 web/app/themes/badegg/app/API/Admin.php diff --git a/web/app/themes/badegg/app/API/Admin.php b/web/app/themes/badegg/app/API/Admin.php new file mode 100644 index 0000000..37c10a0 --- /dev/null +++ b/web/app/themes/badegg/app/API/Admin.php @@ -0,0 +1,36 @@ + 'GET', + 'callback' => [ $this, 'container_width'], + 'permission_callback' => function(){ + return true; + }, + ]); + } + + public function container_width() + { + $containerWidths = [ + [ 'label' => __('Auto', 'badegg'), 'value' => 0 ], + [ 'label' => __('Narrow', 'badegg'), 'value' => 'narrow' ], + [ 'label' => __('Small', 'badegg'), 'value' => 'small' ], + [ 'label' => __('Medium', 'badegg'), 'value' => 'medium' ], + [ 'label' => __('Large', 'badegg'), 'value' => 'large' ], + [ 'label' => __('Edge to edge', 'badegg'), 'value' => 'full' ], + ]; + + return rest_ensure_response($containerWidths); + } +}