Jake Vanderwerf
2026-04-26 86c6cd3cc099d2480932ede03c12cea01e625c94
base/seo.php
@@ -75,7 +75,7 @@
   public static function archive(string $type): array
   {
      $type = self::checkType($type, '[SchemaHelper]::archive');
      error_log('[SchemaHelper]::archive type: '.print_r($type, true));
      if (!$type) {
         return [];
      }
@@ -112,18 +112,37 @@
               'type'   => 'JVBase\managers\SEO\render\Thing\CreativeWork\WebSite',
               'name' => get_bloginfo('name'),
               'url' => get_home_url(),
               'id' => get_home_url() . '#website',
               'id' => get_home_url() . '/#website',
               'description' => get_bloginfo('description'),
               'inLanguage' => 'en-CA'
            ],
            default => []
         },
         'archive' => [
            'type'   => 'JVBase\managers\SEO\render\Thing\CreativeWork\WebPage\CollectionPage',
            'type'   => 'JVBase\inc\managers\SEO\render\Thing\CreativeWork\WebPage\CollectionPage\CollectionPage',
            'name'   => '{{name}}'
         ],
         default => [],
      };
      return apply_filters(BASE.ucfirst($type).ucfirst($format).'Default', $defaults);
      $result = apply_filters(BASE.ucfirst($type).ucfirst($format).'Default', $defaults);
      if ($format === 'reference' && empty($result)) {
         $full = self::getDefault($type, 'schema');
         if (!empty($full)) {
            $result = [
               'type'   => $full['type'],
               'name'   => $full['name'],
               'description'=> $full['description']
            ];
            $check = ['id', 'url'];
            foreach ($check as $ch) {
               if (array_key_exists($ch, $full)) {
                  $result[$ch] = $full[$ch];
               }
            }
         }
      }
      return $result;
   }
   public static function updateHistory(string $type, string $format, array $newest):bool
@@ -256,8 +275,9 @@
      unset($config['type']);
      $class = new $className();
      foreach ($config as $property => $value) {
         if (is_array($value)) {
         if (is_array($value) && array_key_exists('type', $value)) {
            $value = self::classFromConfig($value, $meta);
         }
         $method = 'set'.ucfirst($property);