Jake Vanderwerf
2026-08-26 ccf5e61a075c35d24befc175994b5cb8957ca322
inc/managers/Dashboard/DashboardPage.php
@@ -24,10 +24,8 @@
   protected Cache $cache;
   public function __construct(string $title, string $slug = '', string $icon ='', int $parent = 0) {
      $this->cache = Cache::for('dashboard');
      if (JVB_TESTING) {
         $this->cache->flush();
      }
      $this->cache = Cache::for('dash_pages');
      $this->title = $title;
      $this->setSlug(empty($slug) ? $title : $slug);
      $this->icon = $icon;
@@ -47,7 +45,7 @@
         $this->slug.'_ID',
         function() use ($parentID) {
            $existing = new WP_Query([
               'post_type' => DashboardManager::$based,
               'post_type' => Dashboard::$based,
               'name'      => $this->slug,
               'fields' => 'ids',
               'posts_per_page'=> 1,
@@ -59,7 +57,7 @@
            $args = [
               'post_title'   => $this->title,
               'post_name'    => $this->slug,
               'post_type'    => DashboardManager::$based,
               'post_type'    => Dashboard::$based,
               'post_status'  => 'publish'
            ];
            if ($parentID > 0) {
@@ -83,7 +81,7 @@
   {
      if ($this->slug === 'dash') {
         $this->URL = get_post_type_archive_link(DashboardManager::$based);
         $this->URL = get_post_type_archive_link(Dashboard::$based);
         return;
      }
      $this->URL = get_the_permalink($this->ID);