From f383c3a4325bc173b6f9676274bc19694be6f9c0 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 05 Jun 2026 16:49:44 +0000
Subject: [PATCH] =Modified the Feed Fields config in Registrar, to utilize the built in functionality there
---
content/_setup.php | 90 +++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 87 insertions(+), 3 deletions(-)
diff --git a/content/_setup.php b/content/_setup.php
index 604f962..e37ca1b 100644
--- a/content/_setup.php
+++ b/content/_setup.php
@@ -23,7 +23,7 @@
* - dash_description = (string) customize the description for custom dashboard
* - directory_extra = (array) of BASEless slugs of taxonomies to link in directory
* - sections = (array) 'slug' => $options, where options include ['label' => $label, 'icon' => $iconSlug]; used to split large groups of fields into tabs on the edit page
- * - fields = (array) of fields, as defined in MetaManager.php, as well as additional options:
+ * - fields = (array) of fields, as defined in Meta.php, as well as additional options:
* - 'quickEdit' => (bool) whether this field can be edited in the custom administrator dashboard (best for text fields)
* - 'section' => (string) the slug of the section, as defined above
*/
@@ -33,7 +33,7 @@
require(AJV_DIR . '/content/progress.php');
require(AJV_DIR . '/content/terms.php');
-add_filter('jvb_content', 'altr_content');
+//add_filter('jvb_content', 'altr_content');
function altr_content($content):array
{
return [
@@ -41,4 +41,88 @@
'progress' => altr_progress(),
'terms' => altr_terms(),
];
-}
\ No newline at end of file
+}
+
+/**
+// Example in child plugin's jvb_content filter
+'tattoo' => [
+ 'singular' => 'Tattoo',
+ 'plural' => 'Tattoos',
+ // ... other config
+ 'schema' => [
+ 'type' => 'CreativeWork',
+ 'additional_types' => ['VisualArtwork'],
+ 'properties' => [
+ 'artform' => ['taxonomy' => 'style', 'primary' => true],
+ 'artMedium' => 'ink_colors', // meta key
+ 'creator' => ['callback' => 'jvb_get_artist_schema'],
+ ],
+ ],
+ 'seo' => [
+ 'title_template' => '{{name}} by {{artist}} | {{style}} Tattoo',
+ 'description_template' => '{{name}} - a {{style}} tattoo by {{artist}} at {{shop}}.',
+ 'variables' => [
+ 'artist' => ['taxonomy' => 'artist', 'primary' => true],
+ 'shop' => ['taxonomy' => 'shop', 'primary' => true],
+ 'style' => ['taxonomy' => 'style', 'primary' => true],
+ ],
+ ],
+],
+ *
+ **/
+
+/**
+'jvb-location' => [
+ 'label' => 'Location',
+ 'slug' => 'location',
+ 'schema' => [
+ 'type' => 'LocalBusiness',
+ 'subtype' => 'TattooParlor', // Or BeautySalon, Restaurant, etc
+ 'mappings' => [
+ // Meta field => Schema property (or array of properties)
+ 'location' => ['address', 'geo'], // Maps to both address AND geo
+ 'email' => 'email',
+ 'phone' => 'telephone',
+ 'image' => 'image', // Featured image
+ 'logo' => 'logo', // Separate logo field
+ 'links' => 'sameAs', // Social media links
+ 'hours' => 'openingHoursSpecification', // Opening hours
+ 'services' => 'hasOfferCatalog' // Service list
+ ],
+ 'overrides' => [
+ 'priceRange' => '$$-$$$',
+ 'paymentAccepted' => 'Cash, Credit Card, Square',
+ 'currenciesAccepted' => 'CAD, USD'
+ ]
+ ]
+],
+
+'jvb-artist' => [
+ 'label' => 'Artist',
+ 'slug' => 'artist',
+ 'schema' => [
+ 'type' => 'Person',
+ 'mappings' => [
+ 'email' => 'email',
+ 'phone' => 'telephone',
+ 'featured_image' => 'image',
+ 'bio' => 'description',
+ 'links' => 'sameAs',
+ 'specialty' => 'jobTitle'
+ ]
+ ]
+],
+
+'jvb-artwork' => [
+ 'label' => 'Artwork',
+ 'slug' => 'artwork',
+ 'schema' => [
+ 'type' => 'CreativeWork',
+ 'mappings' => [
+ 'featured_image' => 'image',
+ 'artist_id' => 'creator', // Would need special handling for Person ref
+ 'created_date' => 'dateCreated'
+ ]
+ ]
+]
+ **/
\ No newline at end of file
--
Gitblit v1.10.0