From f4be611c51473359e6d41780f0313c446079e9d3 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Tue, 09 Jun 2026 15:19:24 +0000
Subject: [PATCH] =Switched the /base/options.php to the same pattern as Site.php: a class based approached rather than a filter. Updated Meta.php to play along with the defined fields from there in Meta::forOptions. Had to change openingHoursSpecificationsTrait.php to not use the translater functions __('text','textdomain') for now, as we load before init.
---
inc/rest/routes/SEORoutes.php | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/inc/rest/routes/SEORoutes.php b/inc/rest/routes/SEORoutes.php
index e5154ed..786452a 100644
--- a/inc/rest/routes/SEORoutes.php
+++ b/inc/rest/routes/SEORoutes.php
@@ -1,6 +1,7 @@
<?php
namespace JVBase\rest\routes;
+use JVBase\registrar\Registrar;
use JVBase\rest\Rest;
use JVBase\managers\Cache;
use JVBase\managers\SEO\ConfigManager;
@@ -22,13 +23,13 @@
*/
class SEORoutes extends Rest
{
- protected SchemaBuilder $registry;
+// protected SchemaBuilder $registry;
public function __construct()
{
$this->cacheName = 'schema';
parent::__construct();
- $this->registry = SchemaBuilder::getInstance();
+// $this->registry = SchemaBuilder::getInstance();
}
/**
@@ -43,14 +44,16 @@
'action' => 'string|required|enum:save,reset,preview',
'context'=> 'string|required'
])
- ->rateLimit(30);
+ ->rateLimit(30)
+ ->register();
Route::for('seo/fields')
->get([$this, 'getFields'])
->auth('admin')
->args([
'type'=>'string|required'
- ]);
+ ])
+ ->register();
}
/**
@@ -262,6 +265,6 @@
}
// Check if it's a valid content/taxonomy/user type
- return $this->checkContent($context, true);
+ return (bool)Registrar::getInstance($context);
}
}
--
Gitblit v1.10.0