Jake Vanderwerf
2026-06-05 f383c3a4325bc173b6f9676274bc19694be6f9c0
users/client.php
@@ -1,21 +1,100 @@
<?php
// /users/client.php
function ajv_user_client():array
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 [
        'label'            => 'Client',
        'has_dashboard'    => true,
        'can_create'       => ['support'],
        'can_register'     => true,
        'keep_stats'       => true,
        'join_text'        => 'Save your favourites. Get Notified.',
        'join_title'       => 'Welcome to the Scene.',
        'join_description' => [
            'Save your favourites for easy access',
            'Get notified when your favourite artists add new content',
            'Stay in the loop with local flash days and events',
            'Discover styles and artists that match your vision'
        ],
        'join_bonus'       => '<strong>BONUS: </strong>Everything\'s free. And always will be. We work with partners vetted by the community to keep the lights on.',
        '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',
//        ],
//    ];
//}