get_option('blogname'), 'blogdescription' => get_option('blogdescription') ]; } /** * return an array containing all the custom post types * * @return array */ public static function getCpts(): array { $args = [ 'public' => true, '_builtin' => false, ]; $post_types = get_post_types($args, 'objects'); return array_map( function ($post_type) { $post_type = get_object_vars($post_type); unset($post_type['labels']); return $post_type; }, $post_types ); } /** * return an array containing all the custom taxonomies * * @return array */ public static function getTaxonomies(): array { $args = [ 'public' => true, '_builtin' => false, ]; $taxonomies = get_taxonomies($args, 'objects'); return array_map( function ($taxonomy) { $taxonomy = get_object_vars($taxonomy); unset($taxonomy['labels']); return $taxonomy; }, $taxonomies ); } }