Jake Vanderwerf
2025-09-30 1027291d3af570aab2de3aeb779759b15fe3d3ec
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?php
/*
Plugin Name: Legacy Extension
Plugin URI: https://legacytattooremoval.ca/
Description: An Extension of JakeVan Base, for Legacy Tattoo Removal.
Author: Jake Vanderwerf
Version: 1.0.0
Author URI: https://jakevan.ca/
Textdomain: altr
*/
 
//PLUGIN STRUCTURE
// /content/
//      art.php
//      design.php
//      development.php
//      _setup.php
//      strategy.php
//      writing.php
// /dashboard/
//      _setup.php
// /files/
//      fileManagement.php
// /forms/
//      _setup.php
// /login/
//      _setup.php
// /taxonomies/
//      city.php
//      form.php
//      media.php
//      progress.php
//      _setup.php
//      style.php
//      target.php
//      theme.php
// /users/
//      client.php
//      _setup.php
// ajakevan.php     <-- main plugin file
 
if (!defined('ABSPATH')) {
    exit;
}
 
use JVBase\managers\CacheManager;
 
add_filter('jvb_base', function () {
    return 'altr_';
});
 
 
const AJV_DIR = WP_PLUGIN_DIR . '/alegacy';
define('AJV_URL', plugin_dir_url(__FILE__));
 
require(AJV_DIR . '/content/_setup.php');
//require(AJV_DIR . '/dashboard/_setup.php');
//require(AJV_DIR . '/forms/_setup.php');
require(AJV_DIR . '/login/_setup.php');
require(AJV_DIR . '/taxonomies/_setup.php');
//require(AJV_DIR . '/users/_setup.php');
//require(AJV_DIR . '/files/fileManagement.php');
 
 
/**
 * Defines base options like:
 *         - directory & Membership
 *         - dashboard
 *         - membership settings (JVB_MEMBERSHIP)
 *         - post types (JVB_CONTENT)
 *         - taxonomies (JVB_TAXONOMY)
 *         - User Roles (JVB_USER)
 *         - enthusiast     = (bool) short form for a subscriber-like user that can collect content for reference
 *         - forum            = (bool) create a forum
 *         - member_only    = (bool) if forum and this is true, creates a member-only forum in the custom dashboard
 *
 * as well as central filters for
 *         - rewrite rules
 *         - archive title
 */
add_filter('jvb_site', 'altr_setup_site');
function altr_setup_site():array
{
    return [
        'icons'               => 'light',
        'is_directory'        => true,        //as in, a membership directory
        'has_membership'      => false,
        'has_map'             => true,
        'dashboard'           => true,
        'support'         => false,
        'feed_block'      => true,
        'email_notifications' => false,
        'integrations'  => [
            'bluesky'     => true,
            'cloudflare'  => true,
            'facebook'    => true,
            'maps'        => true,
            'gmb'         => true,
            'helcim'      => false,
            'instagram'   => true,
            'square'      => false,
            'umami'       => true,
        ],
        'is_restaurant'       => false,
        'limit_hours'         => false,
        'enthusiast'          => false,
        'favourites'          => false,    //optional flag to allow enthusiasts, but not favourites
    ];
}
/**
 * JVB_MEMBERSHIP defines the structure of the directory
 *         Options include:
 *         - membership_expires        = useful if members pay a yearly membership fee
 *         - hide_expired                = removes users once membership expired; only used if membership_expires is true
 *         - clip_expired                = keeps users once membership expires, but limits the information shown; only used if membership_expires is true
 *         - membership_approval        = verified users can approve other users
 *         - term_approval              = (bool) verified users can create new terms, but needs approval
 *          - member_only              = (array) if empty, open to any registered user. otherwise an array of registered user roles
 */
//add_filter('jvb_membership', 'altr_setup_membership');
//function altr_setup_membership():array
//{
//    return [
//        'member_content'  => true,
//        'can_invite'      => ['artist' => ['artist']],
//        'member_verified' => true,
//        'notifications'   => true,
//        'forum'           => true,
//        'member_only'     => [ 'artist' ],
//        'member_expires'  => false,
//        'hide_expired'    => false,
//        'clip_expired'    => false,
//        'term_approval'   => true,
//        'can_approve'     => [ 'artist' ]
//    ];
//}
//
//add_filter('jvbLoadingQuips', 'altr_loading_quips');
//function altr_loading_quips(array $quips):array
//{
//    return [];
//}