Jake Vanderwerf
2026-03-08 c19264ac916707096fe294d996a1b7fb85206b34
inc/managers/SEO/render/SchemaOutput.php
@@ -49,9 +49,24 @@
         $registrar = Registrar::getInstance($type);
         if ($registrar && !empty($registrar->getConfig('seo')['schema']??[])) {
            $seo = $registrar->getSEO();
            error_log('SEO: '.print_r($seo->schema(), true));
            $schema[] = $seo->schema()->outputArchiveSchema();
         }
      }
      $isContent = array_values(array_filter(array_map(function($item) {
         return intval(get_option(BASE.$item.'_archive', false));
      },Registrar::getFeatured('is_content', 'term'))));
      if (is_page($isContent)){
         $type = get_post_meta(get_the_id(), BASE.'for_type', true);
         error_log('Type: '.print_r($type, true));
         $registrar = Registrar::getInstance($type);
         if ($registrar) {
            $schema[] = $registrar->getSEO()->schema()->outputContentTaxArchiveSchema();
         }
      }
      $breadcrumbs = $this->buildBreadcrumbs();
      if ($breadcrumbs) {
@@ -61,7 +76,9 @@
      if (!empty($schema)) {
         $website = get_option(BASE.'WebsiteSchema');
         if (!empty($website)) {
            Cache::for('websiteSchema')->flush();
            if (JVB_TESTING) {
               Cache::for('websiteSchema')->flush();
            }
            $website = Cache::for('websiteSchema')->remember(
               'schema',
               function () {
@@ -104,6 +121,7 @@
      echo '<script type="application/ld+json">' . "\n";
      echo wp_json_encode($schema, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
      echo "\n" . '</script>' . "\n";
      echo "\n" . '<!-- / SEO Schema by JakeVan -->'."\n";
   }
   public function buildBreadcrumbs():array
@@ -112,7 +130,11 @@
   }
   public function buildBasicWebsiteSchema():array
   {  Cache::for('websiteSchema')->flush();
   {
      if (JVB_TESTING){
         Cache::for('websiteSchema')->flush();
      }
      return Cache::for('websiteSchema')->remember(
         'reference',
         function () {
@@ -137,7 +159,10 @@
   public function getCreator(bool $reference = false):LocalBusiness
   {
      Cache::for('JakeVanCreator')->flush();
      if (JVB_TESTING){
         Cache::for('JakeVanCreator')->flush();
      }
      if ($reference) {
         return Cache::for('JakeVanCreator')->remember(
            'reference',