| | |
| | | $extra = match($type) { |
| | | 'strategy' => 'Edmonton-focused brand', |
| | | 'project' => 'Edmonton-based', |
| | | 'city' => 'Made in', |
| | | 'target' => 'Helping Canadian', |
| | | 'media' => 'Made in Edmonton with', |
| | | default => 'Edmonton made' |
| | | }; |
| | | $title = ($type === 'directory') ? 'Directory' : Registrar::getInstance($type)->getSingular(); |
| | | |
| | | $title = Registrar::getInstance($type)->getSingular(); |
| | | if (is_tax()) { |
| | | $title = get_queried_object()->name; |
| | | } |
| | | |
| | | return '<small>'.$extra.'</small>'.$title.'.'; |
| | | } |
| | | |
| | |
| | | return ($type === 'directory') ? '' : '<p>Or see <a href="'.JVB()->directories()->getDirectoryList()[$type]['url'].'">alphabetical list</a>.</p>'; |
| | | } |
| | | |
| | | add_filter('jvbBeforeSummary', 'ajv_summary_before', 10, 2); |
| | | function ajv_summary_before(string $return, string $type):string |
| | | { |
| | | $seeIt = match($type) { |
| | | 'art' => '/services/art/', |
| | | 'design' => '/services/design/', |
| | | 'development' => '/services/development/', |
| | | 'strategy' => '/services/strategy/', |
| | | 'writing' => '/services/writing/', |
| | | default => '/services/', |
| | | }; |
| | | return '<ul class="buttons"><li><a class="btn action" href="'.get_home_url(null,$seeIt).'">See what I can do for you</a></li></ul>'; |
| | | } |
| | | |
| | | function ajv_prerender_core_post_content(array $block, ?string $content, ?WP_Block $parent):?string |
| | | { |
| | | if(!is_singular(array_map(function($item) { return BASE.$item; }, Registrar::getRegistered('post')))) { |
| | | return null; |
| | | return JVB()->blocks()->prerender_core_post_content($block, $content, $parent); |
| | | } |
| | | |
| | | $postType = jvbNoBase(get_post_type()); |