base = 'campaign-css'; } /** * Register the routes for this controller. * * @since 1.8.9.2 */ public function register_routes() { $args = array( 'template' => array( 'required' => true, 'type' => 'string', 'sanitize_callback' => 'sanitize_file_name', 'description' => __( 'The campaign template slug (e.g., youth-sports, basic).', 'charitable' ), ), 'p' => array( 'type' => 'string', 'sanitize_callback' => array( $this, 'sanitize_hex_color' ), 'description' => __( 'Primary color (hex without #).', 'charitable' ), ), 's' => array( 'type' => 'string', 'sanitize_callback' => array( $this, 'sanitize_hex_color' ), 'description' => __( 'Secondary color (hex without #).', 'charitable' ), ), 't' => array( 'type' => 'string', 'sanitize_callback' => array( $this, 'sanitize_hex_color' ), 'description' => __( 'Tertiary color (hex without #).', 'charitable' ), ), 'b' => array( 'type' => 'string', 'sanitize_callback' => array( $this, 'sanitize_hex_color' ), 'description' => __( 'Button color (hex without #).', 'charitable' ), ), 'mw' => array( 'type' => 'integer', 'sanitize_callback' => 'absint', 'default' => 800, 'description' => __( 'Mobile breakpoint width in pixels.', 'charitable' ), ), ); // Frontend CSS route register_rest_route( $this->namespace, '/' . $this->base . '/(?P