| | |
| | | $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, |
| | |
| | | $args = [ |
| | | 'post_title' => $this->title, |
| | | 'post_name' => $this->slug, |
| | | 'post_type' => DashboardManager::$based, |
| | | 'post_type' => Dashboard::$based, |
| | | 'post_status' => 'publish' |
| | | ]; |
| | | if ($parentID > 0) { |
| | |
| | | { |
| | | |
| | | 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); |