| | |
| | | <?php |
| | | /* |
| | | Plugin Name: Tatty Soap Extension |
| | | Plugin URI: https://tattysoap.ca/ |
| | | Plugin Name: Madi Mori Extension |
| | | Plugin URI: https://madimori.ca/ |
| | | Description: An Extension of JakeVan Base, for Tatty Soap. |
| | | Author: Jake Vanderwerf |
| | | Version: 1.0.0 |
| | |
| | | exit; |
| | | } |
| | | |
| | | use JVBase\base\Site; |
| | | use JVBase\managers\CacheManager; |
| | | |
| | | add_filter('jvb_base', function () { |
| | |
| | | const ATAT_DIR = WP_PLUGIN_DIR . '/atatty'; |
| | | define('ATAT_URL', plugin_dir_url(__FILE__)); |
| | | |
| | | |
| | | add_filter('jvbChildDir', function() { return ATAT_DIR; }); |
| | | add_filter('jvbChildUrl', function() { return ATAT_URL; }); |
| | | |
| | | require(ATAT_DIR . '/content/_setup.php'); |
| | | require(ATAT_DIR . '/dashboard/_setup.php'); |
| | | require(ATAT_DIR . '/email/_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'); |
| | | |
| | | |
| | | add_action('plugins_loaded', 'atat_siteDefinition', 2); |
| | | add_action('jvbLoadDefinitions', 'atat_siteDefinition'); |
| | | function atat_siteDefinition():void |
| | | { |
| | | if (!class_exists('JVBase\base\Site')) { |
| | | return; |
| | | } |
| | | $site = Site::getInstance(); |
| | | $site->set('icons', 'light'); |
| | | $site->setAll([ |
| | | // 'has_map', |
| | | // 'referrals', |
| | | ]); |
| | | $site->setIntegrations([ |
| | | 'cloudflare', |
| | | 'facebook', |
| | | 'gmb', |
| | | 'helcim', |
| | | 'postmark', |
| | | 'instagram', |
| | | 'umami' |
| | | ]); |
| | | } |
| | | /** |
| | | * Defines base options like: |
| | | * - directory & Membership |
| | |
| | | 'facebook' => true, |
| | | 'maps' => true, |
| | | 'gmb' => true, |
| | | 'helcim' => false, |
| | | 'helcim' => true, |
| | | 'postmark' => true, |
| | | 'instagram' => true, |
| | | 'square' => false, |
| | |
| | | //} |
| | | |
| | | |
| | | //add_filter('jvbAboveHeader', 'atat_header'); |
| | | function atat_legacy_header(string $header):string |
| | | add_filter('jvbBelowHeader', 'atat_header'); |
| | | function atat_header(string $header):string |
| | | { |
| | | return '<p><b>WED - SUN</b> <span class="hide-small"> </span>10<span class="hide-small">:00</span>AM - 6<span class="hide-small">:00</span>PM</p><p>By Appointment<span class="hide-small"> Only</span></p>'; |
| | | return '<p>FREE LOCAL PICKUP at <a href="https://legacytattooremoval.ca/?ref=madimori">Legacy Tattoo Removal</a>.</p>'; |
| | | } |
| | | |
| | | |
| | |
| | | && array_key_exists('className', $block['attrs']) |
| | | && $block['attrs']['className'] === 'is-style-fixed' |
| | | && $nav === '') { |
| | | $call = '<li class="call"><a href="'.jvbPhoneLink(8259257398).'" title="Call Us">'.jvbIcon('phone').'<span class="screen-reader-text">Call Us</span></a></li>'; |
| | | $text = '<li><a href="'.jvbTextLink(8259257398).'" title="Text Us">'.jvbIcon('chat').'<span class="hide-small">825.925.7398</span><sup class="hide-small">PEWU</sup></a></li>'; |
| | | $email = '<li><a href="'.jvbMailToLink( |
| | | 'info@legacytattooremoval.ca', |
| | | $call = sprintf( |
| | | '<li class="call"><a href="%s" title="Call Us">'.jvbIcon('phone').'<span class="screen-reader-text">Call Us</span></a></li>', |
| | | jvbPhoneLink(7802899915), |
| | | ); |
| | | $text = sprintf( |
| | | '<li><a href="%s" title="Text Us">%s<span class="hide-small">780.289.9915</span></a></li>', |
| | | jvbTextLink(7802899915), |
| | | jvbIcon('chat') |
| | | ); |
| | | $email = sprintf( |
| | | '<li><a href="%s" title="Email Us">%s<span class="hide-small">info@madimori.ca</span></a></li>', |
| | | jvbMailToLink( |
| | | 'info@madimori.ca', |
| | | 'Contact from Our Website' |
| | | ).'" title="Email Us">'.jvbIcon('envelope').'<span class="hide-small">info@legacytattooremoval.ca</span></a></li>'; |
| | | ), |
| | | jvbIcon('envelope') |
| | | ); |
| | | |
| | | return $call.$text.$email; |
| | | } |
| | |
| | | && array_key_exists('className', $block['attrs']) |
| | | && $block['attrs']['className'] === 'is-style-floating' |
| | | ) { |
| | | return $nav.'<li><ul class="socials"> |
| | | return sprintf( |
| | | '%s<li><ul class="socials"> |
| | | <li> |
| | | <a href="https://www.facebook.com/tatty.soap/" target="_blank" rel="nofollow" title="Find us on Facebook"> |
| | | '.jvbIcon('facebook-logo').' |
| | | <a href="https://www.facebook.com/madebymadimori/" target="_blank" rel="nofollow" title="Find us on Facebook"> |
| | | %s |
| | | <span class="screen-reader-text"> |
| | | Find us on Facebook |
| | | </span> |
| | | </a> |
| | | </li> |
| | | <li> |
| | | <a href="https://www.instagram.com/tatty.soap" target="_blank" rel="nofollow" title="Find us on Instagram"> |
| | | '.jvbIcon('instagram-logo').' |
| | | <a href="https://www.instagram.com/madebymadimori" target="_blank" rel="nofollow" title="Find us on Instagram"> |
| | | %s |
| | | <span class="screen-reader-text"> |
| | | Find us on Instagram |
| | | </span> |
| | | </a> |
| | | </li> |
| | | </ul></li>'; |
| | | </ul></li>', |
| | | $nav, |
| | | jvbIcon('facebook-logo'), |
| | | jvbIcon('instagram-logo') |
| | | ); |
| | | } |
| | | |
| | | return $nav; |
| | |
| | | ] |
| | | ); |
| | | } |
| | | |
| | | |
| | | add_filter('jvbRandomFooterText', 'atat_footer_text'); |
| | | function atat_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/?ref=madimori">Jake Van</a></p>'; |
| | | } |
| | | |
| | | add_filter('jvbRegisterCustomIcons', 'atat_custom_icons'); |
| | | function atat_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'; |
| | | return $icons; |
| | | } |