unfulvio / wp-api-menus

:abcd: Menu routes for WordPress JSON REST API.
https://wordpress.org/plugins/wp-api-menus
GNU General Public License v2.0
140 stars 59 forks source link

WordPress 5.5 Support #57

Closed thefrosty closed 4 years ago

thefrosty commented 4 years ago

You can read about the REST changes here: https://make.wordpress.org/core/2020/07/22/rest-api-changes-in-wordpress-5-5/

In [48526] a _doing_it_wrong notice has been added when a permission callback is omitted. For REST API routes that are intended to be public, it is recommended to set the permission callback to the __return_true built in function.

Running WordPress 5.5 beta4.

See example notice:

PHP Notice:  register_rest_route was called <strong>incorrectly</strong>. 
The REST API route definition for <code>wp-api-menus/v2/menus</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 /usr/local/wordpress/wp-includes/functions.php on line 5225