Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trailing slash from REST route namespace #131

Merged

Conversation

mjaschen
Copy link
Contributor

@mjaschen mjaschen commented Apr 5, 2024

The namespace of a REST route should not contain a leading or trailing slash. WordPress emits a warning in this case:

"Namespace must not start or end with a slash."

see /wp-includes/rest-api.php, function register_rest_route()

Observed response header (with German locale activated):

x-wp-doingitwrong: register_rest_route (ab 5.4.2; Der Namensraum darf nicht mit einem Schrägstrich beginnen oder enden.)

The namespace of a REST route should not contain a leading or trailing
slash. WordPress emits a warning in this case:

"Namespace must not start or end with a slash."

see `/wp-includes/rest-api.php`, function `register_rest_route()`

Observed response header (with German locale activated):

`x-wp-doingitwrong: register_rest_route (ab 5.4.2; Der Namensraum darf
nicht mit einem Schrägstrich beginnen oder enden.)`
@alexander-heimbuch alexander-heimbuch merged commit 5f29499 into podlove:master May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants