Jake Vanderwerf
2025-12-23 76d68c97f572120dc75d0501cc82acf4022d6b33
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
// /content/setup.php
 
/**
 * JVB_CONTENT: Base post type definitions
 *  Structure:  [ 'slug' => [$options], ]
 *  Note: slug is prepended with BASE in registration
 *  $options includes:
 *  - any $args from register_post_type
 *  - single and plural labels (string)
 *  - hide_single     = (bool) if true, only show posts on author page, not on is_singular() view
 *  - show_feed     = (bool) if true, becomes one of the content types shown in feed block
 *  - show_directory= (bool) if true, creates an alphabetical list directory page
 *  - karma            = (bool) if true, sets up upvotes/downvotes system
 *  - favouritable     = (bool)
 *  - responses        = (bool) if true, sets up comments and replies
 *  - is_calendar    = (bool) if true, sets up default calendar functionality
 *  - single_image    = (bool) if true, and dashboard is setup, each image becomes its own post
 *  - upload_title    = (string)),
 *  - rewrites      = (array) key = associated taxonomy; value = what to append to rewrite base
 *  - description = (array) strings for login description of type
 *  -dash_title = (string) customize the title for custom dashboard
 *  - 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:
 *  - '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
 */
 
 
require(AJV_DIR . '/content/faq.php');
require(AJV_DIR . '/content/progress.php');
require(AJV_DIR . '/content/terms.php');
 
add_filter('jvb_content', 'altr_content');
function altr_content($content):array
{
    return [
        'faq'       => altr_faq(),
        'progress'  => altr_progress(),
        'terms'     => altr_terms(),
    ];
}
 
/**
// 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'
        ]
    ]
]
 **/