true])` call sites elsewhere in the plugin * (admin/partials/reports-page.php, admin/class-abds-seo-score-visibility.php * twice, includes/priority/class-abds-seo-priority-service.php, * includes/reports/class-abds-seo-reports.php, includes/class-abds-seo-core.php) * are deliberately left as-is — refactoring them onto this helper is * out-of-scope churn for R2, not a correctness issue. * * @package ABDS_SEO */ if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Thin wrappers around get_post_types()/get_taxonomies(), slug => label. */ class ABDS_SEO_Taxonomy_Helper { /** * Public post types, slug => human-readable label. * * @return array */ public static function public_post_types(): array { $types = get_post_types( array( 'public' => true ), 'objects' ); return array_map( fn( $type ) => (string) $type->labels->name, $types ); } /** * Public taxonomies, slug => human-readable label. * * @return array */ public static function public_taxonomies(): array { $taxonomies = get_taxonomies( array( 'public' => true ), 'objects' ); return array_map( fn( $tax ) => (string) $tax->labels->name, $taxonomies ); } }