thebatclaudio / wp-rest-api-v2-menus

Adding menus endpoints on WP REST API v2
47 stars 22 forks source link

Errors in admin: register_rest_route called incorrectly #34

Closed Sjeiti closed 4 years ago

Sjeiti commented 4 years ago

I'm getting the following four errors in the admin (API calls work fine):

<br />
<b>Notice</b>:  register_rest_route was called <strong>incorrectly</strong>. The REST API route definition for <code>menus/v1/menus/(?P<id>[a-zA-Z0-9_-]+)</code> is missing the required <code>permission_callback</code> argument. For REST API routes that are intended to be public, use <code>__return_true</code> as the permission callback. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.5.0.) in <b>C:\Users\micro\projects\shapers\DU2020\www\wp-includes\functions.php</b> on line <b>5225</b><br />
<br />
<b>Notice</b>:  register_rest_route was called <strong>incorrectly</strong>. The REST API route definition for <code>menus/v1/locations/(?P<id>[a-zA-Z0-9_-]+)</code> is missing the required <code>permission_callback</code> argument. For REST API routes that are intended to be public, use <code>__return_true</code> as the permission callback. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.5.0.) in <b>C:\Users\micro\projects\shapers\DU2020\www\wp-includes\functions.php</b> on line <b>5225</b><br />
<br />
<b>Notice</b>:  register_rest_route was called <strong>incorrectly</strong>. The REST API route definition for <code>menus/v1/locations</code> is missing the required <code>permission_callback</code> argument. For REST API routes that are intended to be public, use <code>__return_true</code> as the permission callback. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.5.0.) in <b>C:\Users\micro\projects\shapers\DU2020\www\wp-includes\functions.php</b> on line <b>5225</b><br />

I'll try and go fix it.

thebatclaudio commented 4 years ago

Resolved in https://github.com/thebatclaudio/wp-rest-api-v2-menus/pull/33