From 2127b1bdd73ecd2423e443992da4b442f5a3c1a3 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 04 Feb 2026 21:19:25 +0000
Subject: [PATCH] =Major overhaul of MetaManager.php -> Meta.php and RestRouteManager.php -> Rest.php. Seems to work for JakeVan

---
 inc/managers/SchemaManager.php |   75 ++++++++++++++++++-------------------
 1 files changed, 37 insertions(+), 38 deletions(-)

diff --git a/inc/managers/SchemaManager.php b/inc/managers/SchemaManager.php
index c659277..d88016d 100644
--- a/inc/managers/SchemaManager.php
+++ b/inc/managers/SchemaManager.php
@@ -1,13 +1,14 @@
 <?php
 namespace JVBase\managers;
 
-use JVBase\meta\MetaManager;
+use JVBase\meta\Meta;
 use WP_Query;
 
 if (!defined('ABSPATH')) {
     exit; // Exit if accessed directly
 }
 /**
+ * @deprecated use JVBase\managers\seo\SEO.php
  * Schema.org Generator for edmonton.ink
  *
  * This class generates structured schema.org data for better SEO
@@ -240,16 +241,16 @@
      */
     private function getArtistSchema(int $post_id):array
     {
-        $meta = new MetaManager($post_id, 'post');
+        $meta = Meta::forPost($post_id);
 		$metaValues = $meta->getAll();
 
         $permalink = get_permalink($post_id);
 
         // Get artist data
         $name = get_the_title($post_id);
-        $first_name = $meta->getValue('first_name');
-        $bio = $meta->getValue('bio');
-        $short_bio = $meta->getValue('short_bio');
+        $first_name = $meta->get('first_name');
+        $bio = $meta->get('bio');
+        $short_bio = $meta->get('short_bio');
         $description = $short_bio ?: wp_strip_all_tags($bio) ?: get_the_excerpt($post_id);
 
         // Build person schema
@@ -355,7 +356,7 @@
      */
     private function getShopSchema(int $term_id): array
     {
-        $meta = new MetaManager($term_id, 'term');
+        $meta = Meta::forTerm($term_id);
 		$metaValues = $meta->getAll();
         $term = get_term($term_id, BASE.'shop');
         $permalink = get_term_link($term_id, BASE.'shop');
@@ -365,8 +366,8 @@
             [
                 '@type'             => 'LocalBusiness',
                 '@id'               => $permalink . '#organization',
-                'name'              => $term->name,
-                'description'       => $meta->getValue('short_bio') ?: $term->description,
+                'name'              => html_entity_decode($term->name),
+                'description'       => $meta->get('short_bio') ?: $term->description,
                 'url'               => $permalink,
                 'priceRange'        => '$$', // Default price range
                 'additionalType'    => 'https://schema.org/TattooParlor', // Custom business type
@@ -968,7 +969,7 @@
      */
     private function getStyleSchema(int $term_id):array
     {
-        $meta = new MetaManager($term_id, 'term');
+        $meta = Meta::forTerm($term_id);
         $term = get_term($term_id, BASE.'style');
         $permalink = get_term_link($term_id, BASE.'style');
 
@@ -976,8 +977,8 @@
             [
                 '@type' => 'CreativeWork',
                 '@id' => $permalink . '#style',
-                'name' => $term->name,
-                'description' => $meta->getValue('characteristics') ?: $term->description,
+                'name' => html_entity_decode($term->name),
+                'description' => $meta->get('characteristics') ?: $term->description,
                 'url' => $permalink,
                 'mainEntityOfPage' => [
                     '@type' => 'WebPage',
@@ -1002,15 +1003,15 @@
      */
     private function getThemeSchema(int $term_id):array
     {
-        $meta = new MetaManager($term_id, 'term');
+        $meta = Meta::forTerm($term_id);
         $term = get_term($term_id, BASE.'theme');
         $permalink = get_term_link($term_id, BASE.'theme');
 
         $schema = [
             '@type' => 'CreativeWork',
             '@id' => $permalink . '#theme',
-            'name' => $term->name,
-            'description' => $meta->getValue('description') ?: $term->description,
+            'name' => html_entity_decode($term->name),
+            'description' => $meta->get('description') ?: $term->description,
             'url' => $permalink,
             'mainEntityOfPage' => [
                 '@type' => 'WebPage',
@@ -1034,7 +1035,7 @@
      */
     private function getPartnerSchema(int $post_id):array
     {
-        $meta = new MetaManager($post_id, 'post');
+        $meta = Meta::forPost($post_id);
 		$metaValues = $meta->getAll();
         $permalink = get_permalink($post_id);
 
@@ -1090,29 +1091,27 @@
     private function getHomeSchema():array
     {
         // Main dataset schema for homepage
-        $schema = [
-            '@type' => 'WebPage',
-            '@id' => get_home_url() . '/#webpage',
-            'url' => get_home_url(),
-            'name' => get_bloginfo('name') . ' | Edmonton\'s Best Tattoo Artists',
-            'description' => 'Discover Edmonton\'s top tattoo artists, shops, and styles. Your comprehensive guide to Edmonton\'s tattoo scene.',
-            'isPartOf' => [
-                '@id' => get_home_url() . '/#website'
-            ],
-            'about' => [
-                '@type' => 'Dataset',
-                'name' => 'Edmonton Tattoo Artist Directory',
-                'description' => 'Comprehensive directory of professional tattoo artists in Edmonton, Alberta',
-                'creator' => [
-                    '@id' => 'https://legacytattooremoval.ca/#organization'
-                ],
-                'publisher' => [
-                    '@id' => 'https://legacytattooremoval.ca/#organization'
-                ]
-            ],
-        ];
-
-        return $schema;
+		return [
+			'@type' => 'WebPage',
+			'@id' => get_home_url() . '/#webpage',
+			'url' => get_home_url(),
+			'name' => get_bloginfo('name') . ' | Edmonton\'s Best Tattoo Artists',
+			'description' => 'Discover Edmonton\'s top tattoo artists, shops, and styles. Your comprehensive guide to Edmonton\'s tattoo scene.',
+			'isPartOf' => [
+				'@id' => get_home_url() . '/#website'
+			],
+			'about' => [
+				'@type' => 'Dataset',
+				'name' => 'Edmonton Tattoo Artist Directory',
+				'description' => 'Comprehensive directory of professional tattoo artists in Edmonton, Alberta',
+				'creator' => [
+					'@id' => 'https://legacytattooremoval.ca/#organization'
+				],
+				'publisher' => [
+					'@id' => 'https://legacytattooremoval.ca/#organization'
+				]
+			],
+		];
     }
 
     /**

--
Gitblit v1.10.0