Using backbone, can I prevent the nonce from being set?

Yes, the nonce is by default always being sent via the X-WP-Nonce header – see the source here and here on GitHub. wp.api.WPApiBaseModel.prototype.sync and wp.api.WPApiBaseCollection.prototype.sync can technically be extended or modified, but I would instead disable the nonce header like so, i.e. using <Collection or Model object>.endpointModel: Collection example: const Posts = new wp.api.collections.Posts(); // … Read more

How to get posts in backbone where a custom field matches a value?

The REST API endpoint “List Posts” (e.g. GET /wp/v2/posts) does not support filtering the posts by a post meta (or custom field), therefore passing post meta parameters like meta_key and meta_value will by default do nothing. But the rest_<post type>}_query filter can be used to manually add custom meta queries to the query arguments passed … Read more

Can I use the Backbone REST API client outside WordPress?

I haven’t tried this directly, but I’m pretty positive you can — after all, it’s a Javascript library. As long as you: Load any required dependencies; Provide any settings expected by the library; You should be good. A quick code search brings up these results from the /wp-includes/script-loader.php file: $scripts->add( ‘wp-api’, “/wp-includes/js/wp-api$suffix.js”, array( ‘jquery’, ‘backbone’, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)