set('icons', 'light'); $site->setAll([ 'dashboard', 'is_directory', 'magic_link', 'feed_block', // 'faq', // 'referrals' // 'has_map', // 'referrals', ]); $site->setIntegrations([ 'cloudflare', 'facebook', 'gmb', 'maps', 'helcim', 'postmark', 'instagram', 'umami' ]); // $login = $site->login(); $site->setDirectorySingular('List'); $site->setDirectoryPlural('Lists'); } /** * 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', 'ami_setup_site'); function ami_setup_site():array { return [ 'icons' => 'light', 'is_directory' => false, //as in, a membership directory 'has_membership' => false, 'has_map' => false, 'dashboard' => true, 'support' => true, 'feed_block' => true, 'email_notifications' => true, 'integrations' => [ 'bluesky' => true, 'cloudflare' => true, 'facebook' => true, 'maps' => true, 'gmb' => true, 'helcim' => true, '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', 'ami_setup_membership'); //function ami_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', 'ami_loading_quips'); //function ami_loading_quips(array $quips):array //{ // return []; //} //add_filter('jvbBeforeFooter', 'ami_acknowledgement'); function ami_acknowledgement():string { return '

I live and work in Tk’emlúps te Secwe̓pemc territory.

The unceded ancestral lands of Stk’emlúpsemc te Secwépemc Nation.

Kamloops, British Columbia, Canada

'; } add_filter('jvbSeparatorLogo', 'ami_logo_separator'); function ami_logo_separator(string $logo):string { return 'logo-alien-shadow'; } add_filter('jvbRegisterCustomIcons', 'ami_custom_icons'); function ami_custom_icons(array $icons):array { $icons['logo'] = AMI_DIR . '/assets/icons/full-logo.svg'; $icons['logo-text'] = AMI_DIR . '/assets/icons/martian infotech.svg'; $icons['logo-alien'] = AMI_DIR . '/assets/icons/martian infotech logo.svg'; $icons['logo-alien-shadow'] = AMI_DIR . '/assets/icons/martian logo shadow.svg'; return $icons; } add_filter('jvbLoadingIcon', 'ami_loading_icon', 999999); function ami_loading_icon():string { return 'logo-alien'; } add_filter('jvbMenuExtra', 'ami_contact_nav', 10, 3); function ami_contact_nav(string $nav, string $menuName, array $block):string { if (array_key_exists('attrs', $block) && array_key_exists('className', $block['attrs']) && $block['attrs']['className'] === 'is-style-fixed' && $nav === '') { $text = '
  • '.jvbIcon('phone').'780-800-8354
  • '; $email = '
  • '.jvbIcon('envelope').'myron@martianit.ca
  • '; return $text.$email; } if (array_key_exists('attrs', $block) && array_key_exists('className', $block['attrs']) && $block['attrs']['className'] === 'is-style-floating' ) { return $nav.'
  • '.ami_socials_nav().'
  • '; } return $nav; } function ami_socials_nav():string { return ''; } add_filter('jvbAboveHeader', 'ami_above_header'); function ami_above_header(string $header):string { return ami_socials_nav(); } add_filter('jvbBelowHeader', 'ami_below_header'); function ami_below_header(string $header):string { return '

    '.get_bloginfo('description').'

    '; } add_filter('the_seo_framework_meta_render_data', 'ami_no_next_archive', 10, 1); function ami_no_next_archive($tags) { if (is_tax() || is_post_type_archive()) { if (array_key_exists('next', $tags)) { unset($tags['next']); } } return $tags; // Keep the link for other pages }