10 files deleted
8 files renamed
6 files modified
7 files added
| File was renamed from ajakevan.php |
| | |
| | | <?php |
| | | /* |
| | | Plugin Name: JakeVan Extension |
| | | Plugin URI: https://jakevan.ca/ |
| | | Description: An Extension of JakeVan Base, for jakevan. |
| | | 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: ajv |
| | | Textdomain: altr |
| | | */ |
| | | |
| | | //PLUGIN STRUCTURE |
| | |
| | | // art.php |
| | | // design.php |
| | | // development.php |
| | | // setup.php |
| | | // _setup.php |
| | | // strategy.php |
| | | // writing.php |
| | | // /dashboard/ |
| | | // setup.php |
| | | // _setup.php |
| | | // /files/ |
| | | // fileManagement.php |
| | | // /forms/ |
| | | // setup.php |
| | | // _setup.php |
| | | // /login/ |
| | | // setup.php |
| | | // _setup.php |
| | | // /taxonomies/ |
| | | // city.php |
| | | // form.php |
| | | // media.php |
| | | // progress.php |
| | | // setup.php |
| | | // _setup.php |
| | | // style.php |
| | | // target.php |
| | | // theme.php |
| | | // /users/ |
| | | // client.php |
| | | // setup.php |
| | | // _setup.php |
| | | // ajakevan.php <-- main plugin file |
| | | |
| | | if (!defined('ABSPATH')) { |
| | |
| | | use JVBase\managers\CacheManager; |
| | | |
| | | add_filter('jvb_base', function () { |
| | | return 'ajv_'; |
| | | return 'altr_'; |
| | | }); |
| | | |
| | | |
| | | const AJV_DIR = WP_PLUGIN_DIR . '/ajakevan'; |
| | | 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 . '/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'); |
| | | |
| | | |
| | |
| | | * - rewrite rules |
| | | * - archive title |
| | | */ |
| | | add_filter('jvb_site', 'ajv_setup_site'); |
| | | function ajv_setup_site():array |
| | | add_filter('jvb_site', 'altr_setup_site'); |
| | | function altr_setup_site():array |
| | | { |
| | | return [ |
| | | 'icons' => 'light', |
| | | 'is_directory' => false, //as in, a membership directory |
| | | 'is_directory' => true, //as in, a membership directory |
| | | 'has_membership' => false, |
| | | 'has_map' => true, |
| | | 'dashboard' => true, |
| | | 'support' => true, |
| | | 'support' => false, |
| | | 'feed_block' => true, |
| | | 'email_notifications' => true, |
| | | 'email_notifications' => false, |
| | | 'integrations' => [ |
| | | 'bluesky' => true, |
| | | 'cloudflare' => true, |
| | | 'facebook' => false, |
| | | 'facebook' => true, |
| | | 'maps' => true, |
| | | 'gmb' => true, |
| | | 'helcim' => false, |
| | | 'instagram' => false, |
| | | 'square' => true, |
| | | 'instagram' => true, |
| | | 'square' => false, |
| | | 'umami' => true, |
| | | ], |
| | | 'is_restaurant' => false, |
| | | 'limit_hours' => false, |
| | | 'enthusiast' => true, |
| | | 'favourites' => true, //optional flag to allow enthusiasts, but not favourites |
| | | 'enthusiast' => false, |
| | | 'favourites' => false, //optional flag to allow enthusiasts, but not favourites |
| | | ]; |
| | | } |
| | | /** |
| | |
| | | * - 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', 'ajv_setup_membership'); |
| | | //function ajv_setup_membership():array |
| | | //add_filter('jvb_membership', 'altr_setup_membership'); |
| | | //function altr_setup_membership():array |
| | | //{ |
| | | // return [ |
| | | // 'member_content' => true, |
| | |
| | | // ]; |
| | | //} |
| | | // |
| | | //add_filter('jvbLoadingQuips', 'ajv_loading_quips'); |
| | | //function ajv_loading_quips(array $quips):array |
| | | //add_filter('jvbLoadingQuips', 'altr_loading_quips'); |
| | | //function altr_loading_quips(array $quips):array |
| | | //{ |
| | | // return []; |
| | | //} |
| File was renamed from content/setup.php |
| | |
| | | * - 'section' => (string) the slug of the section, as defined above |
| | | */ |
| | | |
| | | require(AJV_DIR . '/content/art.php'); |
| | | require(AJV_DIR . '/content/design.php'); |
| | | require(AJV_DIR . '/content/development.php'); |
| | | require(AJV_DIR . '/content/strategy.php'); |
| | | require(AJV_DIR . '/content/support.php'); |
| | | require(AJV_DIR . '/content/writing.php'); |
| | | |
| | | add_filter('jvb_content', 'ajv_content'); |
| | | function ajv_content($content):array |
| | | 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 [ |
| | | 'design' => ajv_design(), |
| | | 'development' => ajv_development(), |
| | | 'strategy' => ajv_strategy(), |
| | | 'art' => ajv_art(), |
| | | 'writing' => ajv_writing(), |
| | | 'support' => ajv_support(), |
| | | 'faq' => altr_faq(), |
| | | 'progress' => altr_progress(), |
| | | 'terms' => altr_terms(), |
| | | ]; |
| | | } |
| New file |
| | |
| | | <?php |
| | | // /content/art.php |
| | | function altr_faq():array |
| | | { |
| | | return [ |
| | | 'singular' => 'Frequently Asked Question', |
| | | 'plural' => 'Frequently Asked Questions', |
| | | 'dash_description' => 'Manage your answers', |
| | | 'breadcrumb' => 'FAQ', |
| | | 'hide_single' => true, |
| | | 'icon' => 'question', |
| | | 'rewrite' => [ |
| | | 'slug' => 'faq', |
| | | 'with_front' => false, |
| | | ], |
| | | 'fields' => [ |
| | | 'post_title' => [ |
| | | 'type' => 'text', |
| | | 'label' => 'Question', |
| | | ], |
| | | 'answer' => [ |
| | | 'type' => 'textarea', |
| | | 'label' => 'Answer', |
| | | 'quill' => true, |
| | | ], |
| | | ], |
| | | 'single_image' => false, |
| | | 'upload_title' => 'Upload Before & Afters', |
| | | ]; |
| | | } |
| File was renamed from content/art.php |
| | |
| | | <?php |
| | | // /content/art.php |
| | | function ajv_art():array |
| | | function altr_progress():array |
| | | { |
| | | return [ |
| | | 'singular' => 'Art', |
| | | 'plural' => 'Art', |
| | | 'dash_title' => 'Art', |
| | | 'dash_description' => 'Manage your art posts', |
| | | 'breadcrumb' => 'Art', |
| | | 'singular' => 'Before & After', |
| | | 'plural' => 'Before & Afters', |
| | | 'dash_title' => 'Before & Afters', |
| | | 'dash_description' => 'Manage your before and after posts', |
| | | 'breadcrumb' => 'Before & Afters', |
| | | 'hide_single' => false, |
| | | 'show_feed' => true, |
| | | 'favouritable' => true, |
| | | 'favouritable' => false, |
| | | 'karma' => false, |
| | | 'icon' => 'palette', |
| | | 'icon' => 'arrows-left-right', |
| | | 'rewrite' => [ |
| | | 'slug' => 'art', |
| | | 'slug' => 'before-and-after', |
| | | 'with_front' => false, |
| | | ], |
| | | 'fields' => [ |
| | |
| | | ] |
| | | ], |
| | | 'single_image' => false, |
| | | 'upload_title' => 'Upload Artwork', |
| | | 'upload_title' => 'Upload Before & Afters', |
| | | ]; |
| | | } |
| New file |
| | |
| | | <?php |
| | | // /content/art.php |
| | | function altr_terms():array |
| | | { |
| | | return [ |
| | | 'singular' => 'Term', |
| | | 'plural' => 'Terms', |
| | | 'dash_title' => 'Glossary Terms', |
| | | 'dash_description' => 'Manage your terms', |
| | | 'breadcrumb' => 'Glossary', |
| | | 'hide_single' => true, |
| | | 'icon' => 'asterisk', |
| | | 'rewrite' => [ |
| | | 'slug' => 'glossary-of-terms', |
| | | 'with_front' => false, |
| | | ], |
| | | 'fields' => [ |
| | | 'post_title' => [ |
| | | 'type' => 'text', |
| | | 'label' => 'Title', |
| | | ], |
| | | 'definition' => [ |
| | | 'type' => 'textarea', |
| | | 'label' => 'Definition', |
| | | 'quill' => true, |
| | | ], |
| | | ], |
| | | 'single_image' => false, |
| | | 'upload_title' => 'Upload Before & Afters', |
| | | ]; |
| | | } |
| | |
| | | * Custom upload directory structure for edmonton.ink |
| | | * Recreates the original directory logic with shops, artists, partners, etc. |
| | | */ |
| | | add_filter('jvb_upload_directory', 'ajv_upload_directory', 10, 4); |
| | | function ajv_upload_directory($path, $post_type, $user_id, $term_id) |
| | | add_filter('jvb_upload_directory', 'altr_upload_directory', 10, 4); |
| | | function altr_upload_directory($path, $post_type, $user_id, $term_id) |
| | | { |
| | | switch ($post_type) { |
| | | case 'shop': |
| | |
| | | * Custom filename generation for edmonton.ink |
| | | * Recreates the original SEO-friendly filename logic |
| | | */ |
| | | add_filter('jvb_upload_filename', 'ajv_filename', 10, 6); |
| | | function ajv_filename($filename, $original_name, $user_data, $post_type, $user_id, $term_id) |
| | | add_filter('jvb_upload_filename', 'altr_filename', 10, 6); |
| | | function altr_filename($filename, $original_name, $user_data, $post_type, $user_id, $term_id) |
| | | { |
| | | // Get artist/shop/partner details |
| | | $post = (int)get_user_meta($user_id, BASE . 'link', true); |
| | |
| | | '%s-best-tattoo-shop-%s-%s', |
| | | sanitize_title($city), |
| | | sanitize_title($shop_term->name), |
| | | ajv_get_counter($user_id, $post_type) |
| | | altr_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | case 'artist': |
| | | // Profile images: {city}-best-{type}-{specialties}-{name} |
| | | $type = jvbArtistType($post); |
| | | $specialties = ajv_get_artist_top_styles($post); |
| | | $specialties = altr_get_artist_top_styles($post); |
| | | |
| | | return sprintf( |
| | | '%s-best-%s-%s-%s-%s', |
| | |
| | | sanitize_title($type), |
| | | sanitize_title($specialties), |
| | | sanitize_title($user_data->display_name), |
| | | ajv_get_counter($user_id, $post_type) |
| | | altr_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | case 'partner': |
| | |
| | | sanitize_title($city), |
| | | sanitize_title($service_type), |
| | | sanitize_title($user_data->display_name), |
| | | ajv_get_counter($user_id, $post_type) |
| | | altr_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | case 'tattoo': |
| | | // Get style and subject if available |
| | | $style = ajv_get_primary_taxonomy($post, BASE . 'style'); |
| | | $subject = ajv_get_primary_taxonomy($post, BASE . 'theme'); |
| | | $style = altr_get_primary_taxonomy($post, BASE . 'style'); |
| | | $subject = altr_get_primary_taxonomy($post, BASE . 'theme'); |
| | | |
| | | return sprintf( |
| | | '%s-%s-%s-tattoo-by-%s-%s', |
| | |
| | | sanitize_title($style), |
| | | sanitize_title($subject), |
| | | sanitize_title($user_data->display_name), |
| | | ajv_get_counter($user_id, $post_type) |
| | | altr_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | case 'artwork': |
| | | // Get style and subject if available |
| | | $style = ajv_get_primary_taxonomy($post, BASE . 'artstyle'); |
| | | $subject = ajv_get_primary_taxonomy($post, BASE . 'arttheme'); |
| | | $style = altr_get_primary_taxonomy($post, BASE . 'artstyle'); |
| | | $subject = altr_get_primary_taxonomy($post, BASE . 'arttheme'); |
| | | |
| | | return sprintf( |
| | | '%s-%s-%s-artwork-by-%s-%s', |
| | |
| | | sanitize_title($style), |
| | | sanitize_title($subject), |
| | | sanitize_title($user_data->display_name), |
| | | ajv_get_counter($user_id, $post_type) |
| | | altr_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | case 'piercing': |
| | | // Get style if available |
| | | $style = ajv_get_primary_taxonomy($post, BASE . 'pstyle'); |
| | | $style = altr_get_primary_taxonomy($post, BASE . 'pstyle'); |
| | | |
| | | return sprintf( |
| | | '%s-%s-piercing-by-%s-%s', |
| | | sanitize_title($city), |
| | | sanitize_title($style), |
| | | sanitize_title($user_data->display_name), |
| | | ajv_get_counter($user_id, $post_type) |
| | | altr_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | default: |
| | |
| | | sanitize_title($city), |
| | | sanitize_title($content_type), |
| | | sanitize_title($user_data->display_name), |
| | | ajv_get_counter($user_id, $post_type) |
| | | altr_get_counter($user_id, $post_type) |
| | | ); |
| | | } |
| | | } |
| | |
| | | * Custom alt text generation for edmonton.ink |
| | | * Recreates the original detailed alt text logic |
| | | */ |
| | | add_filter('jvb_upload_alt_text', 'ajv_alt_text', 10, 7); |
| | | function ajv_alt_text($alt_text, $file, $user_data, $post_id, $post_type, $user_id, $term_id) |
| | | add_filter('jvb_upload_alt_text', 'altr_alt_text', 10, 7); |
| | | function altr_alt_text($alt_text, $file, $user_data, $post_id, $post_type, $user_id, $term_id) |
| | | { |
| | | $post = get_user_meta($user_id, BASE . 'link', true); |
| | | |
| | |
| | | ); |
| | | |
| | | case 'artist': |
| | | $specialties = ajv_get_artist_top_styles($post); |
| | | $specialties = altr_get_artist_top_styles($post); |
| | | |
| | | return sprintf( |
| | | 'A photo of %s %s %s, specializing in %s tattoos', |
| | |
| | | * Custom image title generation for edmonton.ink |
| | | * Recreates the original SEO-friendly title logic |
| | | */ |
| | | add_filter('jvb_upload_image_title', 'ajv_image_title', 10, 7); |
| | | function ajv_image_title($title, $file, $user_data, $post_id, $post_type, $user_id, $term_id) |
| | | add_filter('jvb_upload_image_title', 'altr_image_title', 10, 7); |
| | | function altr_image_title($title, $file, $user_data, $post_id, $post_type, $user_id, $term_id) |
| | | { |
| | | $post = get_user_meta($user_id, BASE . 'link', true); |
| | | |
| | |
| | | /** |
| | | * Get the next file counter for edmonton.ink style counters |
| | | */ |
| | | function ajv_get_counter($user_id, $post_type) |
| | | function altr_get_counter($user_id, $post_type) |
| | | { |
| | | // Get counter key for this post type |
| | | $counter_key = BASE . str_replace(BASE, '', $post_type) . '_counter'; |
| | |
| | | /** |
| | | * Get artist's top styles for filename generation |
| | | */ |
| | | function ajv_get_artist_top_styles($post_id) |
| | | function altr_get_artist_top_styles($post_id) |
| | | { |
| | | if (!function_exists('JVBase\\meta\\MetaManager')) { |
| | | // Fallback if MetaManager not available |
| | |
| | | /** |
| | | * Get primary taxonomy term for content |
| | | */ |
| | | function ajv_get_primary_taxonomy($post_id, $taxonomy) |
| | | function altr_get_primary_taxonomy($post_id, $taxonomy) |
| | | { |
| | | $terms = wp_get_post_terms($post_id, $taxonomy, array('fields' => 'names')); |
| | | if (is_wp_error($terms) || empty($terms)) { |
| | |
| | | * Get partner type (placeholder - implement based on your edmonton.ink logic) |
| | | * This function was referenced in the original but not provided |
| | | */ |
| | | function ajv_partner_type($post_id) |
| | | function altr_partner_type($post_id) |
| | | { |
| | | // Implement based on your edmonton.ink logic |
| | | // This might look at a taxonomy or meta field |
| File was renamed from login/setup.php |
| | |
| | | <?php |
| | | // /login/setup.php |
| | | add_filter('jvb_login', 'ajv_setup_login'); |
| | | function ajv_setup_login():array |
| | | add_filter('jvb_login', 'altr_setup_login'); |
| | | function altr_setup_login():array |
| | | { |
| | | return [ |
| | | 'login_from_favourite_header' => 'Join the scene; <small>keep your collection.</small>', |
| File was renamed from taxonomies/setup.php |
| | |
| | | * -> add use_in_stats (bool) to use the field in user statistics |
| | | */ |
| | | |
| | | require(AJV_DIR . '/taxonomies/city.php'); |
| | | require(AJV_DIR . '/taxonomies/form.php'); |
| | | require(AJV_DIR . '/taxonomies/media.php'); |
| | | require(AJV_DIR . '/taxonomies/progress.php'); |
| | | require(AJV_DIR . '/taxonomies/age.php'); |
| | | require(AJV_DIR . '/taxonomies/body-part.php'); |
| | | require(AJV_DIR . '/taxonomies/goal.php'); |
| | | require(AJV_DIR . '/taxonomies/skin-type.php'); |
| | | require(AJV_DIR . '/taxonomies/style.php'); |
| | | require(AJV_DIR . '/taxonomies/target.php'); |
| | | require(AJV_DIR . '/taxonomies/theme.php'); |
| | | require(AJV_DIR . '/taxonomies/timeline.php'); |
| | | |
| | | //add_filter('jvb_taxonomy', 'ajv_taxonomy'); |
| | | function ajv_taxonomy():array |
| | | add_filter('jvb_taxonomy', 'altr_taxonomy'); |
| | | function altr_taxonomy():array |
| | | { |
| | | return [ |
| | | 'city' => ajv_city(), |
| | | 'style' => ajv_style(), |
| | | 'theme' => ajv_theme(), |
| | | 'form' => ajv_form(), |
| | | 'medium' => ajv_media(), |
| | | 'target' => ajv_target(), |
| | | 'progress' => ajv_progress(), |
| | | 'age' => altr_age(), |
| | | 'body-part' => altr_body_part(), |
| | | 'goal' => altr_goal(), |
| | | 'skin-type' => altr_skin_type(), |
| | | 'timeline' => altr_timeline(), |
| | | 'style' => altr_style(), |
| | | 'theme' => altr_theme(), |
| | | ]; |
| | | } |
| New file |
| | |
| | | <?php |
| | | // /taxonomies/target.php |
| | | function altr_age():array |
| | | { |
| | | return [ |
| | | 'singular' => 'Age of Tattoo', |
| | | 'plural' => 'Ages of Tattoo', |
| | | 'icon' => 'cake', |
| | | 'show_feed' => true, |
| | | 'rewrite' => [ |
| | | 'slug' => 'age', |
| | | 'with_front' => false, |
| | | 'hierarchical' => false, |
| | | ], |
| | | 'hierarchical' => false, |
| | | 'for_content' => [ |
| | | 'progress', |
| | | ], |
| | | 'fields' => [ |
| | | 'term_name' => [ |
| | | 'label' => 'Name', |
| | | 'type' => 'text', |
| | | 'subtype' => 'number', |
| | | 'quickEdit' => true, |
| | | ], |
| | | 'common' => [ 'wiki' ] |
| | | ] |
| | | ]; |
| | | } |
| New file |
| | |
| | | <?php |
| | | // /taxonomies/form.php |
| | | function altr_body_part():array |
| | | { |
| | | return [ |
| | | 'singular' => 'Location', |
| | | 'plural' => 'Locations', |
| | | 'description' => [ |
| | | 'Location of the tattoo on body.' |
| | | ], |
| | | 'icon' => 'person', |
| | | 'show_feed' => true, |
| | | 'show_directory' => true, |
| | | 'approve_new' => false, |
| | | 'rewrite' => [ |
| | | 'slug' => 'location', |
| | | 'with_front' => false, |
| | | 'hierarchical' => true, |
| | | ], |
| | | 'hierarchical' => true, |
| | | 'for_content' => [ |
| | | 'progress', |
| | | ], |
| | | 'fields' => [ |
| | | 'term_name' => [ |
| | | 'label' => 'Name', |
| | | 'type' => 'text', |
| | | 'quickEdit' => true, |
| | | ], |
| | | 'common' => [ 'wiki' ] |
| | | ] |
| | | ]; |
| | | } |
| New file |
| | |
| | | <?php |
| | | // /taxonomies/goal.php |
| | | function altr_goal():array |
| | | { |
| | | return [ |
| | | 'singular' => 'Goal', |
| | | 'plural' => 'Goals', |
| | | 'icon' => 'crosshair', |
| | | 'description' => [ |
| | | 'Complete tattoo removal or fading for a cover up tattoo (or unknown)' |
| | | ], |
| | | 'show_feed' => true, |
| | | 'rewrite' => [ |
| | | 'slug' => 'goal', |
| | | 'with_front' => false, |
| | | ], |
| | | 'for_content' => [ |
| | | 'progress', |
| | | ], |
| | | 'fields' => [ |
| | | 'term_name' => [ |
| | | 'label' => 'Name', |
| | | 'type' => 'text', |
| | | 'quickEdit' => true, |
| | | ], |
| | | 'common' => [ 'wiki' ] |
| | | ] |
| | | ]; |
| | | } |
| New file |
| | |
| | | <?php |
| | | // /taxonomies/media.php |
| | | function altr_skin_type():array |
| | | { |
| | | return [ |
| | | 'singular' => 'Skin Type', |
| | | 'plural' => 'Skin Types', |
| | | 'description' => [ |
| | | 'According to the FitzPatrick Scale (1 - 6)', |
| | | ], |
| | | 'icon' => 'dots-six', |
| | | 'show_feed' => true, |
| | | 'show_directory' => true, |
| | | 'rewrite' => [ |
| | | 'slug' => 'skin-type', |
| | | 'with_front' => false, |
| | | ], |
| | | 'for_content' => [ |
| | | 'progress' |
| | | ], |
| | | 'fields' => [ |
| | | 'term_name' => [ |
| | | 'label' => 'Name', |
| | | 'type' => 'text', |
| | | 'quickEdit' => true, |
| | | ], |
| | | 'common' => [ 'wiki' ] |
| | | ] |
| | | ]; |
| | | } |
| | |
| | | <?php |
| | | // /taxonomies/style.php |
| | | function ajv_style():array |
| | | function altr_style():array |
| | | { |
| | | return [ |
| | | 'directory' => 'Styles', |
| | |
| | | ], |
| | | 'hierarchical' => true, |
| | | 'for_content' => [ |
| | | 'art', |
| | | 'design', |
| | | 'development', |
| | | 'strategy', |
| | | 'writing', |
| | | 'progress', |
| | | ], |
| | | 'fields' => [ |
| | | 'term_name' => [ |
| | |
| | | <?php |
| | | // /taxonomies/theme.php |
| | | function ajv_theme():array |
| | | function altr_theme():array |
| | | { |
| | | return [ |
| | | 'directory' => 'Themes', |
| | |
| | | 'singular' => 'Theme', |
| | | 'plural' => 'Themes', |
| | | 'icon' => 'hashtag', |
| | | 'favouritable' => true, |
| | | 'show_feed' => true, |
| | | 'approve_new' => false, |
| | | 'rewrite' => [ |
| | | 'slug' => 'themes', |
| | | 'with_front' => false, |
| | |
| | | ], |
| | | 'hierarchical' => true, |
| | | 'for_content' => [ |
| | | 'art', |
| | | 'design', |
| | | 'development', |
| | | 'strategy', |
| | | 'writing', |
| | | 'progress', |
| | | ], |
| | | 'fields' => [ |
| | | 'term_name' => [ |
| New file |
| | |
| | | <?php |
| | | // /taxonomies/progress.php |
| | | function altr_timeline():array |
| | | { |
| | | return [ |
| | | 'singular' => 'Timeline', |
| | | 'plural' => 'Timelines', |
| | | 'icon' => 'hourglass', |
| | | 'show_feed' => true, |
| | | 'show_directory' => true, |
| | | 'rewrite' => [ |
| | | 'slug' => 'timeline', |
| | | 'with_front' => false, |
| | | ], |
| | | 'for_content' => [ |
| | | 'progress', |
| | | ], |
| | | 'fields' => [ |
| | | 'term_name' => [ |
| | | 'label' => 'Name', |
| | | 'type' => 'text', |
| | | 'quickEdit' => true, |
| | | ], |
| | | 'common' => [ 'wiki' ] |
| | | ] |
| | | ]; |
| | | } |
| | |
| | | use JVBase\managers\CacheManager; |
| | | |
| | | add_filter('jvb_base', function () { |
| | | return 'ajv_'; |
| | | return 'altr_'; |
| | | }); |
| | | |
| | | |
| | |
| | | * - rewrite rules |
| | | * - archive title |
| | | */ |
| | | add_filter('jvb_site', 'ajv_setup_site'); |
| | | function ajv_setup_site(): array |
| | | add_filter('jvb_site', 'altr_setup_site'); |
| | | function altr_setup_site(): array |
| | | { |
| | | return [ |
| | | 'icons' => 'light', |
| | |
| | | * - 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', 'ajv_setup_membership'); |
| | | //function ajv_setup_membership():array |
| | | //add_filter('jvb_membership', 'altr_setup_membership'); |
| | | //function altr_setup_membership():array |
| | | //{ |
| | | // return [ |
| | | // 'member_content' => true, |
| | |
| | | // ]; |
| | | //} |
| | | |
| | | add_filter('jvbLoadingQuips', 'ajv_loading_quips'); |
| | | function ajv_loading_quips(array $quips): array |
| | | add_filter('jvbLoadingQuips', 'altr_loading_quips'); |
| | | function altr_loading_quips(array $quips): array |
| | | { |
| | | return []; |
| | | } |
| | | |
| | | |
| | | // /content/art.php |
| | | function ajv_art(): array |
| | | function altr_art(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Art', |
| | |
| | | |
| | | |
| | | // /content/design.php |
| | | function ajv_design(): array |
| | | function altr_design(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Graphic Design', |
| | |
| | | |
| | | |
| | | // /content/development.php |
| | | function ajv_development(): array |
| | | function altr_development(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Development', |
| | |
| | | require(AJV_DIR . '/content/support.php'); |
| | | require(AJV_DIR . '/content/writing.php'); |
| | | |
| | | add_filter('jvb_content', 'ajv_content'); |
| | | function ajv_content($content): array |
| | | add_filter('jvb_content', 'altr_content'); |
| | | function altr_content($content): array |
| | | { |
| | | return [ |
| | | 'design' => ajv_design(), |
| | | 'development' => ajv_development(), |
| | | 'strategy' => ajv_strategy(), |
| | | 'art' => ajv_art(), |
| | | 'writing' => ajv_writing(), |
| | | 'support' => ajv_support(), |
| | | 'design' => altr_design(), |
| | | 'development' => altr_development(), |
| | | 'strategy' => altr_strategy(), |
| | | 'art' => altr_art(), |
| | | 'writing' => altr_writing(), |
| | | 'support' => altr_support(), |
| | | ]; |
| | | } |
| | | |
| | | |
| | | // /content/strategy.php |
| | | function ajv_strategy(): array |
| | | function altr_strategy(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Strategy', |
| | |
| | | |
| | | |
| | | // /content/support.php |
| | | function ajv_support(): array |
| | | function altr_support(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Support', |
| | |
| | | |
| | | |
| | | // /content/writing.php |
| | | function ajv_writing(): array |
| | | function altr_writing(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Writing', |
| | |
| | | |
| | | |
| | | // /login/setup.php |
| | | add_filter('jvb_login', 'ajv_setup_login'); |
| | | function ajv_setup_login(): array |
| | | add_filter('jvb_login', 'altr_setup_login'); |
| | | function altr_setup_login(): array |
| | | { |
| | | return [ |
| | | 'login_from_favourite_header' => 'Join the scene; <small>keep your collection.</small>', |
| | |
| | | |
| | | |
| | | // /taxonomies/city.php |
| | | function ajv_city(): array |
| | | function altr_city(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'City', |
| | |
| | | } |
| | | |
| | | // /taxonomies/form.php |
| | | function ajv_form(): array |
| | | function altr_form(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Form', |
| | |
| | | } |
| | | |
| | | // /taxonomies/media.php |
| | | function ajv_media(): array |
| | | function altr_media(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Medium', |
| | |
| | | } |
| | | |
| | | // /taxonomies/progress.php |
| | | function ajv_progress(): array |
| | | function altr_progress(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Progress', |
| | |
| | | require(AJV_DIR . '/taxonomies/target.php'); |
| | | require(AJV_DIR . '/taxonomies/theme.php'); |
| | | |
| | | add_filter('jvb_taxonomy', 'ajv_taxonomy'); |
| | | function ajv_taxonomy(): array |
| | | add_filter('jvb_taxonomy', 'altr_taxonomy'); |
| | | function altr_taxonomy(): array |
| | | { |
| | | return [ |
| | | 'city' => ajv_city(), |
| | | 'style' => ajv_style(), |
| | | 'theme' => ajv_theme(), |
| | | 'form' => ajv_form(), |
| | | 'medium' => ajv_media(), |
| | | 'target' => ajv_target(), |
| | | 'progress' => ajv_progress(), |
| | | 'city' => altr_city(), |
| | | 'style' => altr_style(), |
| | | 'theme' => altr_theme(), |
| | | 'form' => altr_form(), |
| | | 'medium' => altr_media(), |
| | | 'target' => altr_target(), |
| | | 'progress' => altr_progress(), |
| | | ]; |
| | | } |
| | | |
| | | // /taxonomies/style.php |
| | | function ajv_style(): array |
| | | function altr_style(): array |
| | | { |
| | | return [ |
| | | 'directory' => 'Styles', |
| | |
| | | } |
| | | |
| | | // /taxonomies/target.php |
| | | function ajv_target(): array |
| | | function altr_target(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Target Audience', |
| | |
| | | } |
| | | |
| | | // /taxonomies/theme.php |
| | | function ajv_theme(): array |
| | | function altr_theme(): array |
| | | { |
| | | return [ |
| | | 'directory' => 'Themes', |
| | |
| | | |
| | | |
| | | // /users/client.php |
| | | function ajv_user_client(): array |
| | | function altr_user_client(): array |
| | | { |
| | | return [ |
| | | 'label' => 'Client', |
| | |
| | | } |
| | | |
| | | // /users/enthusiast.php |
| | | function ajv_user_enthusiast(): array |
| | | function altr_user_enthusiast(): array |
| | | { |
| | | return [ |
| | | 'label' => 'Enthusiast', |
| | |
| | | require(AJV_DIR . '/users/client.php'); |
| | | require(AJV_DIR . '/users/enthusiast.php'); |
| | | |
| | | add_filter('jvb_user', 'ajv_user'); |
| | | add_filter('jvb_user', 'altr_user'); |
| | | |
| | | function ajv_user():array |
| | | function altr_user():array |
| | | { |
| | | return [ |
| | | 'enthusiast' => ajv_user_enthusiast(), |
| | | 'client' => ajv_user_client(), |
| | | 'enthusiast' => altr_user_enthusiast(), |
| | | 'client' => altr_user_client(), |
| | | ]; |
| | | } |
| File was renamed from users/setup.php |
| | |
| | | * -> description of the user role. Used in the registration page |
| | | */ |
| | | |
| | | //require(AJV_DIR . '/users/client.php'); |
| | | require(AJV_DIR . '/users/client.php'); |
| | | //require(AJV_DIR . '/users/enthusiast.php'); |
| | | |
| | | //add_filter('jvb_user', 'ajv_user'); |
| | | // |
| | | //function ajv_user():array |
| | | //{ |
| | | // return [ |
| | | //// 'enthusiast' => ajv_user_enthusiast(), |
| | | // 'client' => ajv_user_client(), |
| | | // ]; |
| | | //} |
| | | add_filter('jvb_user', 'altr_user'); |
| | | function altr_user():array |
| | | { |
| | | return [ |
| | | // 'enthusiast' => altr_user_enthusiast(), |
| | | 'client' => altr_user_client(), |
| | | ]; |
| | | } |
| | | |
| | |
| | | <?php |
| | | // /users/client.php |
| | | function ajv_user_client():array |
| | | function altr_user_client():array |
| | | { |
| | | return [ |
| | | 'label' => 'Client', |
| | |
| | | <?php |
| | | // /users/enthusiast.php |
| | | function ajv_user_enthusiast():array |
| | | function altr_user_enthusiast():array |
| | | { |
| | | return [ |
| | | 'label' => 'Enthusiast', |