array( 'name' => __( 'Category', 'peptide-repo-core' ), 'singular_name' => __( 'Category', 'peptide-repo-core' ), ), 'public' => true, 'publicly_queryable' => true, 'show_in_rest' => true, 'show_ui' => true, 'show_admin_column' => true, 'hierarchical' => false, 'rewrite' => array( 'slug' => 'daily/category', 'with_front' => false, ), ) ); } /** * Seed default category terms on activation. * * Idempotent: checks for existence of each term before inserting. * Called by PR_Core_Activator during plugin activation. * * Side effects: may insert terms into wp_terms and wp_term_taxonomy. * * @return void */ public static function seed_terms(): void { $terms = array( 'article', 'guide', 'comparison', 'news' ); foreach ( $terms as $term ) { if ( ! term_exists( $term, self::TAX_CATEGORY ) ) { wp_insert_term( $term, self::TAX_CATEGORY ); } } } }