| | |
| | | { |
| | | $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' => [], |
| | | ]); |
| | | } |
| | | ?> |
| | | |
| | |
| | | |
| | | <?php |
| | | $menu = new Navigation('sidebar'); |
| | | $menuClasses = ['col', 'a-start', 'nowrap']; |
| | | $menuClasses = ['col', 'left', 'nowrap']; |
| | | $itemClasses = ['col']; |
| | | $menu->addClass('col a-start')->hasToggle()->defaultMenuClasses($menuClasses); |
| | | $menu->addClass('col left')->hasToggle()->defaultMenuClasses($menuClasses); |
| | | $menu->defaultItemClasses($itemClasses); |
| | | $pages = $this->getUserAllowedPages()?:[]; |
| | | //Dashboard |
| | |
| | | $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); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | ?> |
| | | <div class="approvals container"> |
| | | <nav class="tabs row start" role="tablist"> |
| | | <nav class="tabs row left" role="tablist"> |
| | | <button type="button" class="tab active" data-tab="summary" role="tab" aria-selected="true"> |
| | | <?= jvbDashIcon('infinity')?>All |
| | | </button> |
| | |
| | | } |
| | | ob_start(); |
| | | ?> |
| | | <nav class="tabs row start" role="tablist"> |
| | | <nav class="tabs row left" role="tablist"> |
| | | <?php |
| | | $i=1; |
| | | $content = Registrar::getRegistered('post'); |