| | |
| | | <?php |
| | | namespace JVBase\managers\SEO; |
| | | |
| | | use JVBase\admin\SEOAdmin; |
| | | use JVBase\Instance; |
| | | use JVBase\managers\AdminPages; |
| | | use JVBase\meta\Form; |
| | | use JVBase\registrar\Registrar; |
| | |
| | | */ |
| | | class SEOAdminPage |
| | | { |
| | | private ConfigManager $config; |
| | | use Instance; |
| | | // private SchemaBuilder $registry; |
| | | |
| | | public function __construct() |
| | |
| | | |
| | | |
| | | // Add to JVB dashboard |
| | | add_action(BASE.'dashboardPage', [$this, 'addDashboardSection'], 10, 1); |
| | | add_filter('jvbDashboardPage', [$this, 'addDashboardSection'], 20, 2); |
| | | add_action('admin_enqueue_scripts', [$this, 'enqueueScripts']); |
| | | } |
| | |
| | | |
| | | public static function renderAdminPageStatic():void |
| | | { |
| | | JVB()->seoAdmin()->renderAdminPage(); |
| | | SEOAdmin::getInstance()->renderAdminPage(); |
| | | } |
| | | |
| | | /** |
| | | * Add section to JVB dashboard |
| | | */ |
| | | public function addDashboardSection(string $content, string $page): string |
| | | public function addDashboardSection(string $page):void |
| | | { |
| | | if ($page !== 'SEO') { |
| | | return $content; |
| | | jvbDump($page); |
| | | if ($page !== 'seo') { |
| | | return; |
| | | } |
| | | ob_start(); |
| | | $this->renderAdminPage(); |
| | | return ob_get_clean(); |
| | | } |
| | | |
| | | /** |