Jake Vanderwerf
2026-08-25 3d25ad7de4fdbb3eba2cde2a62422e6be5d79a0a
inc/managers/SEO/render/Traits/ThingSchema.php
@@ -31,16 +31,17 @@
      nameTrait, ownerTrait, potentialActionTrait, sameAsTrait, subjectOfTrait, urlTrait;
   protected string $id;
   protected bool $showID = true;
   protected array $ignore = [
      'mappedMethods',
      'ignore',
      'id'
      'id',
      'showID',
   ];
   public function outputSchema():array
   {
      global $wp;
      $current = home_url( add_query_arg( $_GET, $wp->request ) );
      $current = get_home_url(null, add_query_arg( $_GET, $wp->request ) );
      $id = (isset($this->id)) ? $this->id : $current.'/#'.strtolower($this->getTypeName());
      $elements = array_map(
         function ($value) {
@@ -76,9 +77,10 @@
         }, ARRAY_FILTER_USE_KEY)
      );
      return  array_merge([
      $id = $this->showID ? ['@id' => $id] : [];
      return  array_merge($id, [
         '@type'  => $this->getTypeName(),
         '@id' => $id,
      ], array_filter($elements));
   }
@@ -133,7 +135,7 @@
   public static function createImageFromID(int $ID):ImageObject|false
   {
      $cache = Cache::for('schemaImage')->connect('post');
      $cache = Cache::for('schemaImage', 'post');
      return $cache->remember(
         $ID,
         function() use($ID) {
@@ -161,4 +163,10 @@
      );
   }
   public function showID(bool $showIt = true):void
   {
      $this->showID = $showIt;
   }
}