=Minor changes to email.php, which had info for Legacy and edmonton.ink hardcoded in it. Added a colours.php and JVB_COLOURS constant to define our base, contrast, action, and secondary colours for use within php templates
1 files added
6 files modified
| | |
| | | Site::getInstance(); |
| | | } |
| | | //require(JVB_DIR.'/base/content.php'); |
| | | require(JVB_DIR.'/base/colours.php'); |
| | | require(JVB_DIR.'/base/email.php'); |
| | | //require(JVB_DIR.'/base/taxonomies.php'); |
| | | //require(JVB_DIR.'/base/users.php'); |
| New file |
| | |
| | | <?php |
| | | |
| | | $defaults = [ |
| | | 'action-0' => '#ff0080', |
| | | 'action-50' => '#ff2492', |
| | | 'action-100' => '#ff47a4', |
| | | 'action-200' => '#ff6bb5', |
| | | 'secondary-0' => '#D69121', |
| | | 'secondary-50' => '#ffc421', |
| | | 'secondary-100' => '#ffcd44', |
| | | 'secondary-200' => '#ffd768', |
| | | 'light' => '#efefef', |
| | | 'light-50' => '#e2e2e2', |
| | | 'light-100' => '#d5d5d5', |
| | | 'light-200' => '#c9c9c9', |
| | | 'dark' => '#151515', |
| | | 'dark-50' => '#222222', |
| | | 'dark-100' => '#2e2e2e', |
| | | 'dark-200' => '#3b3b3b', |
| | | 'action-contrast'=> '', |
| | | 'secondary-contrast'=> '', |
| | | ]; |
| | | |
| | | |
| | | $jvbColours = apply_filters('jvb_colours', $defaults); |
| | | define('JVB_COLOURS', $jvbColours); |
| | |
| | | <?php |
| | | $name = get_bloginfo('name'); |
| | | $desc = get_bloginfo('description'); |
| | | $defaults = [ |
| | | 'colours' => [ |
| | | 'action-0' => '#ff0080', |
| | | 'action-50' => '#ff2492', |
| | | 'action-100' => '#ff47a4', |
| | | 'action-200' => '#ff6bb5', |
| | | 'secondary-0' => '#D69121', |
| | | 'secondary-50' => '#ffc421', |
| | | 'secondary-100' => '#ffcd44', |
| | | 'secondary-200' => '#ffd768', |
| | | 'light' => '#efefef', |
| | | 'light-50' => '#e2e2e2', |
| | | 'light-100' => '#d5d5d5', |
| | | 'light-200' => '#c9c9c9', |
| | | 'dark' => '#151515', |
| | | 'dark-50' => '#222222', |
| | | 'dark-100' => '#2e2e2e', |
| | | 'dark-200' => '#3b3b3b', |
| | | 'action-contrast'=> '', |
| | | 'secondary-contrast'=> '', |
| | | ], |
| | | 'content' => [ |
| | | 'title' => get_bloginfo('name'), |
| | | 'subjectPrefix' => '['.get_bloginfo('name').']', |
| | | 'signature' => '<p>  — ♡ the edmonton.ink crew</p>', |
| | | 'title' => $name, |
| | | 'subjectPrefix' => '['.$name.']', |
| | | 'signature' => '<p>  — ♡ '.$name.'</p>', |
| | | 'footer' => [ |
| | | '<p>© ' . date('Y') . ' edmonton.ink — Your tattoo scene on your screen.</p>', |
| | | '<p><a href="' . get_home_url() . '" class="text-link">edmonton.ink</a></p>' |
| | | '<p>© ' . date('Y') . ' '.$name.' — '.$desc.'</p>', |
| | | '<p><a href="' . get_home_url() . '" class="text-link">'.get_home_url().'</a></p>' |
| | | ] |
| | | ], |
| | | 'types' => [ |
| | | 'newUser' => [ |
| | | 'subject' => 'Welcome to Legacy! Finish creating your account.', |
| | | 'subject' => sprintf( |
| | | 'Welcome to %s! Finish creating your account.', |
| | | get_bloginfo('name') |
| | | ), |
| | | 'showPrefix' => true, |
| | | ], |
| | | 'resetPass' => [ |
| | |
| | | { |
| | | $privacy = get_privacy_policy_url(); |
| | | $privacy = ($privacy === '') ? '' : ' | <a href="'.$privacy.'">Privacy Policy</a>'; |
| | | return apply_filters('jvbRandomFooterText', '<p class="font-small">©'.date('Y').' <a href="'.get_home_url().'">'.get_bloginfo('name').'</a>'.$privacy.'</p><p class="font-small">Built with ♡ by <a href="https://jakevan.ca">Jake Van</a></p>'); |
| | | return apply_filters('jvbRandomFooterText', '<p class="font-small">©'.date('Y').' <a href="'.get_home_url().'">'.get_bloginfo('name').'</a>'.$privacy.'</p><p class="font-small">Built with ♡ by <a href="https://jakevan.ca?ref='.urlencode(get_home_url()).'">Jake Van</a></p>'); |
| | | // |
| | | // $aOpen = '<a href="https://legacytattooremoval.ca" title="Learn more about Legacy Tattoo Removal">'; |
| | | // $options = array( |
| | |
| | | public function getDirectories():array |
| | | { |
| | | $directories = get_option(BASE.'directories'); |
| | | |
| | | if (!$directories) { |
| | | $directories = []; |
| | | //content |
| | |
| | | $title = $config['title']; |
| | | //Bail early if we've already created the page |
| | | $existing = new WP_Query([ |
| | | 'post_type' => BASE.'dash', |
| | | 'post_type' => BASE.'directory', |
| | | 'name' => sanitize_title($title), |
| | | 'posts_per_page' => 1, |
| | | ]); |
| | |
| | | // ]; |
| | | // } |
| | | // } |
| | | |
| | | if (!empty($created)) { |
| | | update_option(BASE.'directory_ids', $created); |
| | | } |
| | |
| | | protected function buildDirectoryList():array |
| | | { |
| | | $saved = get_option(BASE.'directory_list', []); |
| | | |
| | | if (empty($saved)) { |
| | | $all = new WP_Query([ |
| | | 'post_type' => BASE.'directory', |
| | |
| | | class EmailManager |
| | | { |
| | | |
| | | public array $colours = JVB_EMAIL['colours']; |
| | | public array $colours; |
| | | private string $title = JVB_EMAIL['content']['title']; |
| | | private string $prefix = JVB_EMAIL['content']['subjectPrefix']; |
| | | private string $signature = JVB_EMAIL['content']['signature']; |
| | |
| | | $this->site_name = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); |
| | | $this->site_url = get_site_url(); |
| | | $this->footer = (is_array(JVB_EMAIL['content']['footer'])) ? implode('', JVB_EMAIL['content']['footer']) : JVB_EMAIL['content']['footer']; |
| | | |
| | | $this->colours = JVB_COLOURS; |
| | | add_filter('wp_mail_content_type', [$this, 'setHtmlContentType']); |
| | | // User registration emails |
| | | add_filter('wp_new_user_notification_email', [$this, 'customizeNewUserEmail'], 999, 3); |
| | |
| | | $crumbConfig = $registrar->getConfig('breadcrumbs'); |
| | | } |
| | | |
| | | if($registrar && $registrar->hasFeature('show_directory')) { |
| | | $directory = JVB()->directories(); |
| | | if ($directory && !empty($directory->directories($content)??[])){ |
| | | $crumbs[] = [ |
| | | 'name' => $directory->directories($content)['title'], |
| | | 'url' =>$directory->directories($content)['url'] |
| | | ]; |
| | | } |
| | | } |
| | | |
| | | // Handle directory posts specially |
| | | if (JVB()->directories() && JVB()->directories()->isDirectory()) { |
| | | $pos = jvbGetDirectoryInfo(); |
| | |
| | | |
| | | if($registrar && $registrar->hasFeature('show_directory') && JVB()->directories()) { |
| | | $directory = JVB()->directories(); |
| | | |
| | | if ($directory && !empty($directory->directories($name)??[])){ |
| | | $crumbs[] = [ |
| | | 'name' => $directory->directories($name)['title'], |