[ 'name' => __( 'Ad Groups', 'advajra' ), 'singular_name' => __( 'Ad Group', 'advajra' ), ], 'public' => false, 'show_ui' => false, // Hidden from standard UI, managed in React. 'supports' => [ 'title' ], 'show_in_rest' => true, 'capability_type' => 'post', 'map_meta_cap' => true, ] ); } /** * Register the REST API Routes. */ public function register_rest_routes() { if ( class_exists( '\AdVajra\API\Groups' ) ) { ( new \AdVajra\API\Groups() )->register_routes(); } } }