Jake Vanderwerf
2026-06-05 f383c3a4325bc173b6f9676274bc19694be6f9c0
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
<?php
// /users/client.php
 
use JVBase\registrar\Registrar;
if (!defined('ABSPATH')) {
    exit;
}
 
add_action('jvbDefineRegistrar', 'altr_client');
add_action('jvbDefineRegistrarFields', 'altr_client_fields');
add_action('plugins_loaded', 'altr_client',1);
//Add fields later so we can verify taxonomies/post types exist
add_action('plugins_loaded', 'altr_client_fields', 2);
 
add_filter('altr_ClientSchemaDefault', 'altr_client_schema');
add_filter('altr_ClientMetaDefault', 'altr_client_meta');
add_filter('altr_ClientArchiveDefault', 'altr_client_archive');
 
function altr_client(){
    if (!class_exists('JVBase\registrar\Registrar')) {
        return;
    }
    $client = Registrar::forUser('client', 'Client', 'Clients')
        ->setIcon('user')
        ->make([
            'can_create'    => ['support']
        ])
        ->setAll([
            'has_dashboard',
            'show_feed',
            'can_register',
        ]);
 
//$directory = $client->getConfig('directory');
 
}
 
function altr_client_fields():void
{
    if (!class_exists('JVBase\registrar\Registrar')) {
        return;
    }
    $client = Registrar::getInstance('client');
 
    $fields = $client->fields();
    $fields->addCommon('wiki');
}
 
function altr_client_schema():array
{
    return [
        'name'              => '{{name}} Laser Tattoo Removal Before & Afters',
    ];
}
 
function altr_client_meta():array
{
    return[
        'name'              => '{{name}} – Before & After Laser Tattoo Removal',
        'description'       => 'Before and after results for clients seeking {{term_name}}. See how PicoWay laser technology delivers results in Edmonton.',
    ];
}
 
function altr_client_archive(array $defaults):array
{
    return array_merge($defaults, [
        'name' => '{{name}} – Laser Tattoo Removal Results',
    ]);
}
 
function altr_client_reference_schema(array $defaults):array
{
    return $defaults;
}
 
 
//
//function altr_user_client():array
//{
//    return [
//        'label'            => 'Client',
//        'singular'          => 'Singular',
//        'plural'            => 'Plural',
//        'has_dashboard'    => true,
//        'can_create'       => ['support'],
//        'can_register'     => true,
//        'keep_stats'       => false,
//        'icon'             => 'user',
//        'register'          => [
//            'text'      => 'Refer your friends. Get rewarded.',
//            'title'     => 'Create Your Account',
//            'description'   => [
//                'Get your unique share code',
//                'Share it with your friends',
//                'Get notified when you get your credit'
//            ],
//            'submit'    => 'Create Your Account',
//        ],
//    ];
//}