| | |
| | | { |
| | | $this->cache = Cache::for('dashboard', WEEK_IN_SECONDS)->connect('user'); |
| | | add_action('init', [$this, 'registerDashboard']); |
| | | $this->cache->flush(); |
| | | |
| | | $this->user = wp_get_current_user(); |
| | | $this->role = jvbUserRole($this->user->ID); |
| | | $this->userLink = (int)get_user_meta($this->user->ID, BASE.'profile_link', true); |
| | |
| | | if (function_exists($function)) { |
| | | echo $function([],''); |
| | | } else { |
| | | echo JVB()->blocks()->render_core_site_logo([],''); |
| | | echo render_block( [ |
| | | 'blockName' => 'core/site-logo', |
| | | 'attrs' => [], |
| | | ]); |
| | | } |
| | | ?> |
| | | |
| | |
| | | $itemMenu = $item->submenu($slug); |
| | | foreach ($taxonomies as $s) { |
| | | $taxRegistrar = Registrar::getInstance($s); |
| | | $itemMenu->addItem($taxRegistrar->getPlural(), $taxRegistrar->getIcon()) |
| | | if ($taxRegistrar) { |
| | | $itemMenu->addItem($taxRegistrar->getPlural(), $taxRegistrar->getIcon()) |
| | | ->url($this->baseURL.'/'.$s); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |