=Base Plugin setup for new Site class config
7 files deleted
1 files renamed
14 files modified
| | |
| | | <?php |
| | | |
| | | function atat_render_core_site_logo(array $block, string $content):string |
| | | function aei_render_core_site_logo(array $block, string $content):string |
| | | { |
| | | $open = $close = ''; |
| | | |
| | |
| | | if (array_key_exists('className', $block['attrs'])) { |
| | | $logo = false; |
| | | if (str_contains($block['attrs']['className'], 'is-proper')) { |
| | | $logo = '<img class="logo" src="'.ATAT_URL.'/assets/tatty-soap-rose-header.webp">'; |
| | | $logo = '<img class="logo" src="'.AEI_URL.'/assets/tatty-soap-rose-header.webp">'; |
| | | } |
| | | if ($logo) { |
| | | return $open.$logo.$close; |
| | |
| | | return JVB()->blocks()->render_core_site_logo($block, $content); |
| | | } |
| | | |
| | | function atat_render_core_template_part(array $block, string $content): string |
| | | function aei_render_core_template_part(array $block, string $content): string |
| | | { |
| | | if (!array_key_exists('attrs', $block) || !array_key_exists('slug', $block['attrs']) || !in_array($block['attrs']['slug'], ['header', 'footer'])){ |
| | | return JVB()->blocks()->render_core_template_part($block, $content); |
| | | } |
| | | $content = JVB()->blocks()->render_core_template_part($block, $content); |
| | | $icon = file_get_contents(ATAT_DIR .'/assets/icons/background.svg'); |
| | | $icon = file_get_contents(AEI_DIR .'/assets/icons/background.svg'); |
| | | $search = str_contains($content, '<header>') ? '</header>' : '</footer>'; |
| | | return str_replace($search, $icon.$search, $content); |
| | | |
| | |
| | | */ |
| | | |
| | | |
| | | require(ATAT_DIR . '/content/soap.php'); |
| | | require(AEI_DIR . '/content/soap.php'); |
| | | |
| | | //add_filter('jvb_content', 'atat_content'); |
| | | //function atat_content($content):array |
| | | //add_filter('jvb_content', 'aei_content'); |
| | | //function aei_content($content):array |
| | | //{ |
| | | // return [ |
| | | // 'soap' => atat_soap(), |
| | | // 'soap' => aei_soap(), |
| | | // ]; |
| | | //} |
| | |
| | | exit; |
| | | } |
| | | |
| | | add_action('jvbDefineRegistrar', 'aei_soap'); |
| | | add_action('jvbDefineRegistrarFields', 'aei_soap_fields'); |
| | | |
| | | add_action('jvbDefineRegistrar', 'atat_soap'); |
| | | add_action('jvbDefineRegistrarFields', 'atat_soap_fields'); |
| | | |
| | | add_action('plugins_loaded', 'atat_soap',3); |
| | | add_action('plugins_loaded', 'aei_soap',3); |
| | | //Add fields later so we can verify taxonomies/post types exist |
| | | add_action('plugins_loaded', 'atat_soap_fields', 4); |
| | | add_action('plugins_loaded', 'aei_soap_fields', 4); |
| | | |
| | | add_filter('atat_FaqSchemaDefault', 'atat_soap_schema'); |
| | | add_filter('atat_FaqMetaDefault', 'atat_soap_meta'); |
| | | add_filter('atat_FaqArchiveDefault', 'atat_soap_archive'); |
| | | add_filter('aei_SoapSchemaDefault', 'aei_soap_schema'); |
| | | add_filter('aei_SoapMetaDefault', 'aei_soap_meta'); |
| | | add_filter('aei_SoapArchiveDefault', 'aei_soap_archive'); |
| | | |
| | | function atat_soap(){ |
| | | function aei_soap(){ |
| | | if (!class_exists('JVBase\registrar\Registrar')) { |
| | | return; |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | function atat_soap_fields():void |
| | | function aei_soap_fields():void |
| | | { |
| | | if (!class_exists('JVBase\registrar\Registrar')) { |
| | | return; |
| | |
| | | ]); |
| | | } |
| | | |
| | | function atat_soap_schema():array |
| | | function aei_soap_schema():array |
| | | { |
| | | return [ |
| | | 'type' => 'JVBase\managers\SEO\render\Thing\Product\Product', |
| | |
| | | ]; |
| | | } |
| | | |
| | | function atat_soap_meta():array |
| | | function aei_soap_meta():array |
| | | { |
| | | return[ |
| | | 'name' => '{{post_title}} | Handmade in Edmonton', |
| | | ]; |
| | | } |
| | | |
| | | function atat_soap_archive(array $defaults):array |
| | | function aei_soap_archive(array $defaults):array |
| | | { |
| | | return array_merge($defaults, [ |
| | | 'name' => 'Handmade Soaps', |
| | |
| | | ]); |
| | | } |
| | | |
| | | function atat_soap_reference_schema(array $defaults):array |
| | | function aei_soap_reference_schema(array $defaults):array |
| | | { |
| | | return $defaults; |
| | | } |
| | | // /content/soap.php |
| | | //function atat_soap():array |
| | | //function aei_soap():array |
| | | //{ |
| | | // return [ |
| | | // 'singular' => 'Soap', |
| File was renamed from atatty.php |
| | |
| | | <?php |
| | | /* |
| | | Plugin Name: Tatty Soap Extension |
| | | Plugin URI: https://tattysoap.ca/ |
| | | Description: An Extension of JakeVan Base, for Tatty Soap. |
| | | Plugin Name: Edmonton Ink Extension |
| | | Plugin URI: https://edmonton.ink/ |
| | | Description: An Extension of JakeVan Base, for Edmonton ink. |
| | | Author: Jake Vanderwerf |
| | | Version: 1.0.0 |
| | | Author URI: https://jakevan.ca/ |
| | | Textdomain: atat |
| | | Textdomain: aei |
| | | */ |
| | | |
| | | if (!defined('ABSPATH')) { |
| | |
| | | use JVBase\managers\CacheManager; |
| | | |
| | | add_filter('jvb_base', function () { |
| | | return 'atat_'; |
| | | return 'aei_'; |
| | | }); |
| | | |
| | | |
| | | const ATAT_DIR = WP_PLUGIN_DIR . '/atatty'; |
| | | define('ATAT_URL', plugin_dir_url(__FILE__)); |
| | | const AEI_DIR = WP_PLUGIN_DIR . '/edmontonink'; |
| | | define('AEI_URL', plugin_dir_url(__FILE__)); |
| | | |
| | | |
| | | add_filter('jvbChildDir', function() { return ATAT_DIR; }); |
| | | add_filter('jvbChildUrl', function() { return ATAT_URL; }); |
| | | add_filter('jvbChildDir', function() { return AEI_DIR; }); |
| | | add_filter('jvbChildUrl', function() { return AEI_URL; }); |
| | | |
| | | require(ATAT_DIR . '/content/_setup.php'); |
| | | require(ATAT_DIR . '/dashboard/_setup.php'); |
| | | require(ATAT_DIR . '/email/_setup.php'); |
| | | require(ATAT_DIR . '/forms/_setup.php'); |
| | | require(ATAT_DIR . '/login/_setup.php'); |
| | | require(ATAT_DIR . '/taxonomies/_setup.php'); |
| | | require(ATAT_DIR . '/users/_setup.php'); |
| | | require(ATAT_DIR . '/blocks/_setup.php'); |
| | | require(ATAT_DIR . '/seo.php'); |
| | | //require(ATAT_DIR . '/files/fileManagement.php'); |
| | | require(AEI_DIR . '/content/_setup.php'); |
| | | require(AEI_DIR . '/dashboard/_setup.php'); |
| | | require(AEI_DIR . '/email/_setup.php'); |
| | | require(AEI_DIR . '/forms/_setup.php'); |
| | | require(AEI_DIR . '/login/_setup.php'); |
| | | require(AEI_DIR . '/taxonomies/_setup.php'); |
| | | require(AEI_DIR . '/users/_setup.php'); |
| | | require(AEI_DIR . '/blocks/_setup.php'); |
| | | require(AEI_DIR . '/seo.php'); |
| | | //require(AEI_DIR . '/files/fileManagement.php'); |
| | | |
| | | add_action('plugins_loaded', 'atat_siteDefinition', 2); |
| | | add_action('jvbLoadDefinitions', 'atat_siteDefinition'); |
| | | function atat_siteDefinition():void |
| | | add_action('plugins_loaded', 'aei_siteDefinition', 2); |
| | | add_action('jvbLoadDefinitions', 'aei_siteDefinition'); |
| | | function aei_siteDefinition():void |
| | | { |
| | | if (!class_exists('JVBase\base\Site')) { |
| | | return; |
| | |
| | | * - rewrite rules |
| | | * - archive title |
| | | */ |
| | | add_filter('jvb_site', 'atat_setup_site'); |
| | | function atat_setup_site():array |
| | | add_filter('jvb_site', 'aei_setup_site'); |
| | | function aei_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', 'atat_setup_membership'); |
| | | //function atat_setup_membership():array |
| | | //add_filter('jvb_membership', 'aei_setup_membership'); |
| | | //function aei_setup_membership():array |
| | | //{ |
| | | // return [ |
| | | // 'member_content' => true, |
| | |
| | | // ]; |
| | | //} |
| | | // |
| | | //add_filter('jvbLoadingQuips', 'atat_loading_quips'); |
| | | //function atat_loading_quips(array $quips):array |
| | | //add_filter('jvbLoadingQuips', 'aei_loading_quips'); |
| | | //function aei_loading_quips(array $quips):array |
| | | //{ |
| | | // return []; |
| | | //} |
| | | |
| | | |
| | | add_filter('jvbBelowHeader', 'atat_header'); |
| | | function atat_header(string $header):string |
| | | add_filter('jvbBelowHeader', 'aei_header'); |
| | | function aei_header(string $header):string |
| | | { |
| | | return '<p>FREE LOCAL PICKUP at <a href="https://legacytattooremoval.ca/">Legacy Tattoo Removal</a>.</p>'; |
| | | } |
| | | |
| | | |
| | | |
| | | add_filter('jvbMenuExtra', 'atat_contact_nav', 10, 3); |
| | | function atat_contact_nav(string $nav, string $menuName, array $block):string |
| | | add_filter('jvbMenuExtra', 'aei_contact_nav', 10, 3); |
| | | function aei_contact_nav(string $nav, string $menuName, array $block):string |
| | | { |
| | | if (array_key_exists('attrs', $block) |
| | | && array_key_exists('className', $block['attrs']) |
| | |
| | | } |
| | | |
| | | |
| | | add_action('jvbBlockStyles', 'atat_blockStyles'); |
| | | function atat_blockStyles() |
| | | add_action('jvbBlockStyles', 'aei_blockStyles'); |
| | | function aei_blockStyles() |
| | | { |
| | | register_block_style( |
| | | 'core/list', |
| | | [ |
| | | 'name'=>'blocky', |
| | | 'label' => __('Blocky', 'atat') |
| | | 'label' => __('Blocky', 'aei') |
| | | ] |
| | | ); |
| | | register_block_style( |
| | | 'core/group', |
| | | [ |
| | | 'name'=>'triangle', |
| | | 'label' => __('Triangle', 'atat') |
| | | 'label' => __('Triangle', 'aei') |
| | | ] |
| | | ); |
| | | } |
| | | |
| | | |
| | | add_filter('jvbRandomFooterText', 'atat_footer_text'); |
| | | function atat_footer_text(string $text):string |
| | | add_filter('jvbRandomFooterText', 'aei_footer_text'); |
| | | function aei_footer_text(string $text):string |
| | | { |
| | | $privacy = get_privacy_policy_url(); |
| | | $privacy = ($privacy === '') ? '' : ' | <a href="'.$privacy.'">Privacy Policy</a>'; |
| | | return '<p class="font-small">©'.date('Y').' <a href="https://madimori.ca/">Madi Mori</a>'.$privacy.'</p><p class="font-small">Built with ♡ by <a href="https://jakevan.ca">Jake Van</a></p>'; |
| | | } |
| | | |
| | | add_filter('jvbRegisterCustomIcons', 'atat_custom_icons'); |
| | | function atat_custom_icons(array $icons):array |
| | | add_filter('jvbRegisterCustomIcons', 'aei_custom_icons'); |
| | | function aei_custom_icons(array $icons):array |
| | | { |
| | | $icons['background'] = ATAT_DIR . '/assets/icons/background.svg'; |
| | | // $icons['logo-jakevan'] = ATAT_DIR . '/assets/icons/logo-concentric-jakevan.svg'; |
| | | // $icons['logo-right'] = ATAT_DIR . '/assets/icons/logo-right-aligned.svg'; |
| | | // $icons['logo-right-jakevan'] = ATAT_DIR . '/assets/icons/logo-right-aligned-jakevan.svg'; |
| | | // $icons['jakevan'] = ATAT_DIR . '/assets/icons/jakevan.svg'; |
| | | // $icons['loading'] = ATAT_DIR . '/assets/icons/loading.svg'; |
| | | $icons['background'] = AEI_DIR . '/assets/icons/background.svg'; |
| | | // $icons['logo-jakevan'] = AEI_DIR . '/assets/icons/logo-concentric-jakevan.svg'; |
| | | // $icons['logo-right'] = AEI_DIR . '/assets/icons/logo-right-aligned.svg'; |
| | | // $icons['logo-right-jakevan'] = AEI_DIR . '/assets/icons/logo-right-aligned-jakevan.svg'; |
| | | // $icons['jakevan'] = AEI_DIR . '/assets/icons/jakevan.svg'; |
| | | // $icons['loading'] = AEI_DIR . '/assets/icons/loading.svg'; |
| | | return $icons; |
| | | } |
| | |
| | | <?php |
| | | |
| | | $jvbEmail = add_filter('jvb_email', 'atat_email'); |
| | | $jvbEmail = add_filter('jvb_email', 'aei_email'); |
| | | |
| | | function atat_email(array $defaults):array |
| | | function aei_email(array $defaults):array |
| | | { |
| | | return [ |
| | | 'colours' => [ |
| | |
| | | * |
| | | */ |
| | | |
| | | add_filter('jvbNewUserEmail', 'atat_new_user_email', 10, 2); |
| | | function atat_new_user_email(string $message, WP_User $user):string |
| | | add_filter('jvbNewUserEmail', 'aei_new_user_email', 10, 2); |
| | | function aei_new_user_email(string $message, WP_User $user):string |
| | | { |
| | | |
| | | $user_login = $user->user_login; |
| | |
| | | * Custom upload directory structure for edmonton.ink |
| | | * Recreates the original directory logic with shops, artists, partners, etc. |
| | | */ |
| | | add_filter('jvb_upload_directory', 'atat_upload_directory', 10, 4); |
| | | function atat_upload_directory($path, $post_type, $user_id, $term_id) |
| | | add_filter('jvb_upload_directory', 'aei_upload_directory', 10, 4); |
| | | function aei_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', 'atat_filename', 10, 6); |
| | | function atat_filename($filename, $original_name, $user_data, $post_type, $user_id, $term_id) |
| | | add_filter('jvb_upload_filename', 'aei_filename', 10, 6); |
| | | function aei_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), |
| | | atat_get_counter($user_id, $post_type) |
| | | aei_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | case 'artist': |
| | | // Profile images: {city}-best-{type}-{specialties}-{name} |
| | | $type = jvbArtistType($post); |
| | | $specialties = atat_get_artist_top_styles($post); |
| | | $specialties = aei_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), |
| | | atat_get_counter($user_id, $post_type) |
| | | aei_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | case 'partner': |
| | |
| | | sanitize_title($city), |
| | | sanitize_title($service_type), |
| | | sanitize_title($user_data->display_name), |
| | | atat_get_counter($user_id, $post_type) |
| | | aei_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | case 'tattoo': |
| | | // Get style and subject if available |
| | | $style = atat_get_primary_taxonomy($post, BASE . 'style'); |
| | | $subject = atat_get_primary_taxonomy($post, BASE . 'theme'); |
| | | $style = aei_get_primary_taxonomy($post, BASE . 'style'); |
| | | $subject = aei_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), |
| | | atat_get_counter($user_id, $post_type) |
| | | aei_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | case 'artwork': |
| | | // Get style and subject if available |
| | | $style = atat_get_primary_taxonomy($post, BASE . 'artstyle'); |
| | | $subject = atat_get_primary_taxonomy($post, BASE . 'arttheme'); |
| | | $style = aei_get_primary_taxonomy($post, BASE . 'artstyle'); |
| | | $subject = aei_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), |
| | | atat_get_counter($user_id, $post_type) |
| | | aei_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | case 'piercing': |
| | | // Get style if available |
| | | $style = atat_get_primary_taxonomy($post, BASE . 'pstyle'); |
| | | $style = aei_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), |
| | | atat_get_counter($user_id, $post_type) |
| | | aei_get_counter($user_id, $post_type) |
| | | ); |
| | | |
| | | default: |
| | |
| | | sanitize_title($city), |
| | | sanitize_title($content_type), |
| | | sanitize_title($user_data->display_name), |
| | | atat_get_counter($user_id, $post_type) |
| | | aei_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', 'atat_alt_text', 10, 7); |
| | | function atat_alt_text($alt_text, $file, $user_data, $post_id, $post_type, $user_id, $term_id) |
| | | add_filter('jvb_upload_alt_text', 'aei_alt_text', 10, 7); |
| | | function aei_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 = atat_get_artist_top_styles($post); |
| | | $specialties = aei_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', 'atat_image_title', 10, 7); |
| | | function atat_image_title($title, $file, $user_data, $post_id, $post_type, $user_id, $term_id) |
| | | add_filter('jvb_upload_image_title', 'aei_image_title', 10, 7); |
| | | function aei_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 atat_get_counter($user_id, $post_type) |
| | | function aei_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 atat_get_artist_top_styles($post_id) |
| | | function aei_get_artist_top_styles($post_id) |
| | | { |
| | | if (!function_exists('JVBase\\meta\\MetaManager')) { |
| | | // Fallback if MetaManager not available |
| | |
| | | /** |
| | | * Get primary taxonomy term for content |
| | | */ |
| | | function atat_get_primary_taxonomy($post_id, $taxonomy) |
| | | function aei_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 atat_partner_type($post_id) |
| | | function aei_partner_type($post_id) |
| | | { |
| | | // Implement based on your edmonton.ink logic |
| | | // This might look at a taxonomy or meta field |
| | |
| | | * |
| | | ************************************************************/ |
| | | |
| | | require(ATAT_DIR . '/forms/contact.php'); |
| | | require(AEI_DIR . '/forms/contact.php'); |
| | | |
| | | add_filter('jvb_register_forms', 'atat_register_forms'); |
| | | add_filter('jvb_register_forms', 'aei_register_forms'); |
| | | |
| | | function atat_register_forms($forms) { |
| | | $forms['contact'] = atat_contact(); |
| | | function aei_register_forms($forms) { |
| | | $forms['contact'] = aei_contact(); |
| | | return $forms; |
| | | } |
| | |
| | | <?php |
| | | |
| | | function atat_contact():array |
| | | function aei_contact():array |
| | | { |
| | | return [ |
| | | 'title' => '', |
| | |
| | | <?php |
| | | // /login/setup.php |
| | | add_filter('jvb_login', 'atat_setup_login'); |
| | | function atat_setup_login():array |
| | | add_filter('jvb_login', 'aei_setup_login'); |
| | | function aei_setup_login():array |
| | | { |
| | | return [ |
| | | 'login' => [ |
| | |
| | | <?php |
| | | |
| | | |
| | | add_filter('atat_OrganizationSchemaDefault', 'atat_organization_schema'); |
| | | function atat_organization_schema(array $schema): array |
| | | add_filter('aei_OrganizationSchemaDefault', 'aei_organization_schema'); |
| | | function aei_organization_schema(array $schema): array |
| | | { |
| | | return array_merge($schema, [ |
| | | 'id' => '#legacy-tattoo-removal', |
| | |
| | | ]); |
| | | } |
| | | |
| | | add_filter('atat_WebsiteSchemaDefault', 'atat_website_schema'); |
| | | function atat_website_schema(array $schema): array |
| | | add_filter('aei_WebsiteSchemaDefault', 'aei_website_schema'); |
| | | function aei_website_schema(array $schema): array |
| | | { |
| | | return array_merge( |
| | | $schema, |
| | |
| | | * -> add use_in_stats (bool) to use the field in user statistics |
| | | */ |
| | | |
| | | require(ATAT_DIR . '/taxonomies/flags.php'); |
| | | require(AEI_DIR . '/taxonomies/flags.php'); |
| | | |
| | | //add_filter('jvb_taxonomy', 'atat_taxonomy'); |
| | | //function atat_taxonomy():array |
| | | //add_filter('jvb_taxonomy', 'aei_taxonomy'); |
| | | //function aei_taxonomy():array |
| | | //{ |
| | | // return [ |
| | | // 'flags' => atat_flags(), |
| | | // 'flags' => aei_flags(), |
| | | // ]; |
| | | //} |
| | |
| | | exit; |
| | | } |
| | | |
| | | add_action('jvbDefineRegistrar', 'atat_flag'); |
| | | add_action('jvbDefineRegistrarFields', 'atat_flag_fields'); |
| | | add_action('jvbDefineRegistrar', 'aei_flag'); |
| | | add_action('jvbDefineRegistrarFields', 'aei_flag_fields'); |
| | | |
| | | add_action('plugins_loaded', 'atat_flag',3); |
| | | add_action('plugins_loaded', 'aei_flag',3); |
| | | //Add fields later so we can verify taxonomies/post types exist |
| | | add_action('plugins_loaded', 'atat_flag_fields', 4); |
| | | add_action('plugins_loaded', 'aei_flag_fields', 4); |
| | | |
| | | add_filter('atat_AgeSchemaDefault', 'atat_flag_schema'); |
| | | add_filter('atat_AgeMetaDefault', 'atat_flag_meta'); |
| | | add_filter('atat_AgeArchiveDefault', 'atat_flag_archive'); |
| | | add_filter('aei_AgeSchemaDefault', 'aei_flag_schema'); |
| | | add_filter('aei_AgeMetaDefault', 'aei_flag_meta'); |
| | | add_filter('aei_AgeArchiveDefault', 'aei_flag_archive'); |
| | | |
| | | function atat_flag(){ |
| | | function aei_flag(){ |
| | | if (!class_exists('JVBase\registrar\Registrar')) { |
| | | return; |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | function atat_flag_fields():void |
| | | function aei_flag_fields():void |
| | | { |
| | | if (!class_exists('JVBase\registrar\Registrar')) { |
| | | return; |
| | |
| | | $fields->addCommon('keywords'); |
| | | } |
| | | |
| | | function atat_flag_schema():array |
| | | function aei_flag_schema():array |
| | | { |
| | | return [ |
| | | 'name' => 'How to Remove a {{name}} Old Tattoo - Before & After', |
| | | ]; |
| | | } |
| | | |
| | | function atat_flag_meta():array |
| | | function aei_flag_meta():array |
| | | { |
| | | return[ |
| | | 'name' => 'How to Remove a {{name}} Old Tattoo - Before & After', |
| | |
| | | ]; |
| | | } |
| | | |
| | | function atat_flag_archive(array $defaults):array |
| | | function aei_flag_archive(array $defaults):array |
| | | { |
| | | return array_merge($defaults, [ |
| | | 'name' => 'Removing {{term_name}} Old Tattoos – Before & After', |
| | | ]); |
| | | } |
| | | |
| | | function atat_flag_reference_schema(array $defaults):array |
| | | function aei_flag_reference_schema(array $defaults):array |
| | | { |
| | | return $defaults; |
| | | } |
| | | |
| | | // |
| | | //function atat_flags():array |
| | | //function aei_flags():array |
| | | //{ |
| | | // return [ |
| | | // 'singular' => 'Flag', |
| | |
| | | use JVBase\managers\CacheManager; |
| | | |
| | | add_filter('jvb_base', function () { |
| | | return 'atat_'; |
| | | return 'aei_'; |
| | | }); |
| | | |
| | | |
| | | const ATAT_DIR = WP_PLUGIN_DIR . '/ajakevan'; |
| | | define('ATAT_URL', plugin_dir_url(__FILE__)); |
| | | const AEI_DIR = WP_PLUGIN_DIR . '/ajakevan'; |
| | | define('AEI_URL', plugin_dir_url(__FILE__)); |
| | | |
| | | require(ATAT_DIR . '/content/setup.php'); |
| | | //require(ATAT_DIR . '/dashboard/setup.php'); |
| | | //require(ATAT_DIR . '/forms/setup.php'); |
| | | require(ATAT_DIR . '/login/setup.php'); |
| | | require(ATAT_DIR . '/taxonomies/setup.php'); |
| | | //require(ATAT_DIR . '/users/setup.php'); |
| | | //require(ATAT_DIR . '/files/fileManagement.php'); |
| | | require(AEI_DIR . '/content/setup.php'); |
| | | //require(AEI_DIR . '/dashboard/setup.php'); |
| | | //require(AEI_DIR . '/forms/setup.php'); |
| | | require(AEI_DIR . '/login/setup.php'); |
| | | require(AEI_DIR . '/taxonomies/setup.php'); |
| | | //require(AEI_DIR . '/users/setup.php'); |
| | | //require(AEI_DIR . '/files/fileManagement.php'); |
| | | |
| | | |
| | | /** |
| | |
| | | * - rewrite rules |
| | | * - archive title |
| | | */ |
| | | add_filter('jvb_site', 'atat_setup_site'); |
| | | function atat_setup_site(): array |
| | | add_filter('jvb_site', 'aei_setup_site'); |
| | | function aei_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', 'atat_setup_membership'); |
| | | //function atat_setup_membership():array |
| | | //add_filter('jvb_membership', 'aei_setup_membership'); |
| | | //function aei_setup_membership():array |
| | | //{ |
| | | // return [ |
| | | // 'member_content' => true, |
| | |
| | | // ]; |
| | | //} |
| | | |
| | | add_filter('jvbLoadingQuips', 'atat_loading_quips'); |
| | | function atat_loading_quips(array $quips): array |
| | | add_filter('jvbLoadingQuips', 'aei_loading_quips'); |
| | | function aei_loading_quips(array $quips): array |
| | | { |
| | | return []; |
| | | } |
| | | |
| | | |
| | | // /content/art.php |
| | | function atat_art(): array |
| | | function aei_art(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Art', |
| | |
| | | |
| | | |
| | | // /content/design.php |
| | | function atat_design(): array |
| | | function aei_design(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Graphic Design', |
| | |
| | | |
| | | |
| | | // /content/development.php |
| | | function atat_development(): array |
| | | function aei_development(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Development', |
| | |
| | | * - 'section' => (string) the slug of the section, as defined above |
| | | */ |
| | | |
| | | require(ATAT_DIR . '/content/art.php'); |
| | | require(ATAT_DIR . '/content/design.php'); |
| | | require(ATAT_DIR . '/content/development.php'); |
| | | require(ATAT_DIR . '/content/strategy.php'); |
| | | require(ATAT_DIR . '/content/support.php'); |
| | | require(ATAT_DIR . '/content/writing.php'); |
| | | require(AEI_DIR . '/content/art.php'); |
| | | require(AEI_DIR . '/content/design.php'); |
| | | require(AEI_DIR . '/content/development.php'); |
| | | require(AEI_DIR . '/content/strategy.php'); |
| | | require(AEI_DIR . '/content/support.php'); |
| | | require(AEI_DIR . '/content/writing.php'); |
| | | |
| | | add_filter('jvb_content', 'atat_content'); |
| | | function atat_content($content): array |
| | | add_filter('jvb_content', 'aei_content'); |
| | | function aei_content($content): array |
| | | { |
| | | return [ |
| | | 'design' => atat_design(), |
| | | 'development' => atat_development(), |
| | | 'strategy' => atat_strategy(), |
| | | 'art' => atat_art(), |
| | | 'writing' => atat_writing(), |
| | | 'support' => atat_support(), |
| | | 'design' => aei_design(), |
| | | 'development' => aei_development(), |
| | | 'strategy' => aei_strategy(), |
| | | 'art' => aei_art(), |
| | | 'writing' => aei_writing(), |
| | | 'support' => aei_support(), |
| | | ]; |
| | | } |
| | | |
| | | |
| | | // /content/strategy.php |
| | | function atat_strategy(): array |
| | | function aei_strategy(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Strategy', |
| | |
| | | |
| | | |
| | | // /content/support.php |
| | | function atat_support(): array |
| | | function aei_support(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Support', |
| | |
| | | |
| | | |
| | | // /content/writing.php |
| | | function atat_writing(): array |
| | | function aei_writing(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Writing', |
| | |
| | | |
| | | |
| | | // /login/setup.php |
| | | add_filter('jvb_login', 'atat_setup_login'); |
| | | function atat_setup_login(): array |
| | | add_filter('jvb_login', 'aei_setup_login'); |
| | | function aei_setup_login(): array |
| | | { |
| | | return [ |
| | | 'login_from_favourite_header' => 'Join the scene; <small>keep your collection.</small>', |
| | |
| | | |
| | | |
| | | // /taxonomies/city.php |
| | | function atat_city(): array |
| | | function aei_city(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'City', |
| | |
| | | } |
| | | |
| | | // /taxonomies/form.php |
| | | function atat_form(): array |
| | | function aei_form(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Form', |
| | |
| | | } |
| | | |
| | | // /taxonomies/media.php |
| | | function atat_media(): array |
| | | function aei_media(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Medium', |
| | |
| | | } |
| | | |
| | | // /taxonomies/progress.php |
| | | function atat_progress(): array |
| | | function aei_progress(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Progress', |
| | |
| | | * -> add use_in_stats (bool) to use the field in user statistics |
| | | */ |
| | | |
| | | require(ATAT_DIR . '/taxonomies/city.php'); |
| | | require(ATAT_DIR . '/taxonomies/form.php'); |
| | | require(ATAT_DIR . '/taxonomies/media.php'); |
| | | require(ATAT_DIR . '/taxonomies/progress.php'); |
| | | require(ATAT_DIR . '/taxonomies/style.php'); |
| | | require(ATAT_DIR . '/taxonomies/target.php'); |
| | | require(ATAT_DIR . '/taxonomies/theme.php'); |
| | | require(AEI_DIR . '/taxonomies/city.php'); |
| | | require(AEI_DIR . '/taxonomies/form.php'); |
| | | require(AEI_DIR . '/taxonomies/media.php'); |
| | | require(AEI_DIR . '/taxonomies/progress.php'); |
| | | require(AEI_DIR . '/taxonomies/style.php'); |
| | | require(AEI_DIR . '/taxonomies/target.php'); |
| | | require(AEI_DIR . '/taxonomies/theme.php'); |
| | | |
| | | add_filter('jvb_taxonomy', 'atat_taxonomy'); |
| | | function atat_taxonomy(): array |
| | | add_filter('jvb_taxonomy', 'aei_taxonomy'); |
| | | function aei_taxonomy(): array |
| | | { |
| | | return [ |
| | | 'city' => atat_city(), |
| | | 'style' => atat_style(), |
| | | 'theme' => atat_theme(), |
| | | 'form' => atat_form(), |
| | | 'medium' => atat_media(), |
| | | 'target' => atat_target(), |
| | | 'progress' => atat_progress(), |
| | | 'city' => aei_city(), |
| | | 'style' => aei_style(), |
| | | 'theme' => aei_theme(), |
| | | 'form' => aei_form(), |
| | | 'medium' => aei_media(), |
| | | 'target' => aei_target(), |
| | | 'progress' => aei_progress(), |
| | | ]; |
| | | } |
| | | |
| | | // /taxonomies/style.php |
| | | function atat_style(): array |
| | | function aei_style(): array |
| | | { |
| | | return [ |
| | | 'directory' => 'Styles', |
| | |
| | | } |
| | | |
| | | // /taxonomies/target.php |
| | | function atat_target(): array |
| | | function aei_target(): array |
| | | { |
| | | return [ |
| | | 'singular' => 'Target Audience', |
| | |
| | | } |
| | | |
| | | // /taxonomies/theme.php |
| | | function atat_theme(): array |
| | | function aei_theme(): array |
| | | { |
| | | return [ |
| | | 'directory' => 'Themes', |
| | |
| | | |
| | | |
| | | // /users/client.php |
| | | function atat_user_client(): array |
| | | function aei_user_client(): array |
| | | { |
| | | return [ |
| | | 'label' => 'Client', |
| | |
| | | } |
| | | |
| | | // /users/enthusiast.php |
| | | function atat_user_enthusiast(): array |
| | | function aei_user_enthusiast(): array |
| | | { |
| | | return [ |
| | | 'label' => 'Enthusiast', |
| | |
| | | * -> description of the user role. Used in the registration page |
| | | */ |
| | | |
| | | require(ATAT_DIR . '/users/client.php'); |
| | | require(ATAT_DIR . '/users/enthusiast.php'); |
| | | require(AEI_DIR . '/users/client.php'); |
| | | require(AEI_DIR . '/users/enthusiast.php'); |
| | | |
| | | add_filter('jvb_user', 'atat_user'); |
| | | add_filter('jvb_user', 'aei_user'); |
| | | |
| | | function atat_user():array |
| | | function aei_user():array |
| | | { |
| | | return [ |
| | | 'enthusiast' => atat_user_enthusiast(), |
| | | 'client' => atat_user_client(), |
| | | 'enthusiast' => aei_user_enthusiast(), |
| | | 'client' => aei_user_client(), |
| | | ]; |
| | | } |
| | |
| | | * -> description of the user role. Used in the registration page |
| | | */ |
| | | |
| | | require(ATAT_DIR . '/users/client.php'); |
| | | //require(ATAT_DIR . '/users/enthusiast.php'); |
| | | require(AEI_DIR . '/users/client.php'); |
| | | //require(AEI_DIR . '/users/enthusiast.php'); |
| | | |
| | | add_filter('jvb_user', 'atat_user'); |
| | | function atat_user():array |
| | | add_filter('jvb_user', 'aei_user'); |
| | | function aei_user():array |
| | | { |
| | | return [ |
| | | // 'enthusiast' => atat_user_enthusiast(), |
| | | 'client' => atat_user_client(), |
| | | // 'enthusiast' => aei_user_enthusiast(), |
| | | 'client' => aei_user_client(), |
| | | ]; |
| | | } |
| | | |
| | |
| | | <?php |
| | | // /users/client.php |
| | | function atat_user_client():array |
| | | function aei_user_client():array |
| | | { |
| | | return [ |
| | | 'label' => 'Client', |