Jake Vanderwerf
2026-04-15 c4aa5cdb5e90ad4b420e22772797d16980232a2b
inc/managers/SEO/SchemaOutputManager.php
@@ -5,6 +5,7 @@
use JVBase\managers\SEO\schemas\SchemaResolverRegistry;
use JVBase\meta\Meta;
use JVBase\managers\SEO\schemas\SchemaDefinition;
use JVBase\registrar\Registrar;
use WP_Term;
use WP_User;
@@ -61,21 +62,16 @@
    */
   public function excludeHiddenSingles(array $ids): array
   {
      $hiddenTypes = [];
      $timelineTypes = [];
      $hiddenTypes = array_map(function($type) {
            return jvbCheckBase($type);
         },
         Registrar::getFeatured('hide_single', 'post')
      );
      // Find post types with hide_single or is_timeline flags
      foreach (JVB_CONTENT as $slug => $config) {
         $postType = BASE . $slug;
      $timelineTypes = array_map(function($type) {
         return jvbCheckBase($type);
      }, Registrar::getFeatured('is_timeline', 'post'));
         if (!empty($config['hide_single'])) {
            $hiddenTypes[] = $postType;
         }
         if (!empty($config['is_timeline'])) {
            $timelineTypes[] = $postType;
         }
      }
      $hiddenIds = [];
@@ -121,7 +117,6 @@
   public function filterTitle(string $title, ?array $args): string
   {
      if ($args !== null) {
         // Not in the loop (admin, etc.)
         return $title;
      }
@@ -139,7 +134,15 @@
      $resolver = $this->getResolver();
      $customTitle = $resolver->resolve($metaConfig['metaTitle']);
      return $customTitle ?: $title;
      if (!$customTitle) {
         return $title;
      }
      // Strip trailing site name — TSF adds its own branding
      $siteName = get_bloginfo('name');
      $customTitle = preg_replace('/\s*[|\-–—]\s*' . preg_quote($siteName, '/') . '\s*$/i', '', $customTitle);
      return $customTitle;
   }
   /**
@@ -563,7 +566,7 @@
         $post = get_post();
         if ($post) {
            $postType = jvbNoBase($post->post_type);
            if (defined('JVB_CONTENT') && isset(JVB_CONTENT[$postType])) {
            if (Registrar::getInstance($postType)) {
               $this->config = ConfigManager::for($postType);
               return [
                  'objectType' => 'post',
@@ -576,7 +579,7 @@
         $term = get_queried_object();
         if ($term instanceof WP_Term) {
            $taxonomy = jvbNoBase($term->taxonomy);
            if (defined('JVB_TAXONOMY') && isset(JVB_TAXONOMY[$taxonomy])) {
            if (Registrar::getInstance($taxonomy)) {
               $this->config = ConfigManager::for($taxonomy);
               return [
                  'objectType' => 'term',
@@ -589,7 +592,7 @@
         $user = get_queried_object();
         if ($user instanceof WP_User) {
            $role = jvbUserRole($user->ID);
            if (defined('JVB_USER') && isset(JVB_USER[$role])) {
            if (Registrar::getInstance($role)) {
               $this->config = ConfigManager::for($role);
               return [
                  'objectType' => 'user',
@@ -605,7 +608,7 @@
         }
         $postType = jvbNoBase($postType);
         if (defined('JVB_CONTENT') && isset(JVB_CONTENT[$postType])) {
         if (Registrar::getInstance($postType)) {
            $this->config = ConfigManager::for($postType);
            return [
               'objectType' => 'archive',