$this->namespace = 'wp/v2';
$this->rest_base = 'global-styles';
$this->post_type = 'wp_global_styles';
} /**
* Registers the controllers routes.
*
* @since 5.9.0
*/
public function register_routes() { register_rest_route( $this->namespace,
'/' .
$this->rest_base . '/themes/(?P<stylesheet>[\/\s%\w\.\(\)\[\]\@_\-]+)/variations',
array
( array
( 'methods' => WP_REST_Server::READABLE,
'callback' => array
( $this, 'get_theme_items'
),
'permission_callback' => array
( $this, 'get_theme_items_permissions_check'
),
'args' => array
( 'stylesheet' => array
( 'description' =>
__( 'The theme identifier'
),
'type' => 'string',
),