Skip to content

Commit

Permalink
Rename WPCF7_REST_Controller::namespace
Browse files Browse the repository at this point in the history
Fixes #609
  • Loading branch information
takayukister committed Oct 11, 2021
1 parent aab2ccb commit 2219960
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions includes/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ function () {

class WPCF7_REST_Controller {

const namespace = 'contact-form-7/v1';
const route_namespace = 'contact-form-7/v1';

public function register_routes() {

register_rest_route( self::namespace,
register_rest_route( self::route_namespace,
'/contact-forms',
array(
array(
Expand Down Expand Up @@ -50,7 +50,7 @@ public function register_routes() {
)
);

register_rest_route( self::namespace,
register_rest_route( self::route_namespace,
'/contact-forms/(?P<id>\d+)',
array(
'args' => $this->get_argument_schema(),
Expand Down Expand Up @@ -105,7 +105,7 @@ public function register_routes() {
)
);

register_rest_route( self::namespace,
register_rest_route( self::route_namespace,
'/contact-forms/(?P<id>\d+)/feedback',
array(
'args' => $this->get_argument_schema(),
Expand All @@ -117,7 +117,7 @@ public function register_routes() {
)
);

register_rest_route( self::namespace,
register_rest_route( self::route_namespace,
'/contact-forms/(?P<id>\d+)/refill',
array(
'args' => $this->get_argument_schema(),
Expand Down

0 comments on commit 2219960

Please sign in to comment.