| 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; |
| | | } |