| | |
| | | */ |
| | | class SEOAdminPage |
| | | { |
| | | private ConfigManager $config; |
| | | // 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']); |
| | | } |
| | |
| | | /** |
| | | * 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(); |
| | | } |
| | | |
| | | /** |