public function register_custom_content_types() { $content_types = Content_Type::getAll(); foreach ($content_types as $content_type) { $this->register_content_type($content_type->name); if (property_exists($content_type, 'taxonomies')) { foreach ($content_type->taxonomies as $taxonomy) { $this->register_taxonomy($taxonomy->name, str_replace(" ", "_", strtolower($content_type->name))); } } } $taxonomies = Taxonomy::getAll(); foreach ($taxonomies as $taxonomy) { $this->register_taxonomy($taxonomy->name, 'all'); } }
/** * list all custom content types */ private function content_types_admin_index() { $content_types = Content_Type::getAll(); $taxonomies = Taxonomy::getAll(); $page_templates = Page_Template::getAll(); require_once plugin_dir_path(__FILE__) . 'partials/rooftop-content-types-admin-index.php'; }