Skip to content

Commit

Permalink
Update regex to match core trac update
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaz committed Dec 8, 2021
1 parent 93355ed commit c1cc4a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function register_routes() {
// Lists/updates a single global style variation based on the given id.
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/(?P<id>[\/\d]+)',
'/' . $this->rest_base . '/(?P<id>[\/\w\.-]+)',
array(
array(
'methods' => WP_REST_Server::READABLE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function register_routes() {
// Lists/updates a single template based on the given id.
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/(?P<id>[.*\/]?[\/\w\.-]+)',
'/' . $this->rest_base . '/(?P<id>[\/\w\.-]+)',
array(
array(
'methods' => WP_REST_Server::READABLE,
Expand Down

0 comments on commit c1cc4a4

Please sign in to comment.