I want to retrieve all posts of a blog without username & password
XML-RPC is what you need. Enable it on your site and use WordPress XML-RPC API to get information which you need. Related thread on stackoverflow: Android XML-RPC library?
XML-RPC is what you need. Enable it on your site and use WordPress XML-RPC API to get information which you need. Related thread on stackoverflow: Android XML-RPC library?
Use the XML-RPC API to post to your blog. Windows Live Writer and other apps are using that too. I am not very familiar with that API, so I have no good examples. But you should find enough with the keyword. There are also many plugins with sample code.
Assuming you’re talking about the body of a comment, there’s nothing to worry about. We already sanitize comment and thread messages.
No, without going into too much ranting, the wordpress core philosophy is based on user experience and API stability, this kind of restructuring is impossible without “breaking some eggs” so I don’t imagine core wordpress to go that direction in any time soon. In addition, it doesn’t make much sense for anything smaller than google/amazon/facebook … Read more
I approached this slightly different for those interested. I wanted to keep my API as light as possible, and not bloat it with versions/revisions and users, so ended up creating a 2nd Laravel instance. On this 2nd Laravel instance (consumer) we used Laravel Socialite as we already use Google as SSO provider. The user logs … Read more
I found that it didn’t work because both endpoints used the same route. I expected defining one for POST and one for GET would result in different callbacks, but they apparently conflict with each other. In a first time, I get the request going through simply by change the namespace for the POST. Maybe there … Read more
Basically, what you’ll need to do is XML-ize your data and POST it to the API URLs they provide. I’ll start out with the basic request, and we can build on the solution if you want. <?php $api_key = ‘API_KEY’; // insert your API key here; $ticket=”TICKET_ID”; // your ticket here (should be with your … Read more
Found the problem. And A WORD OF WARNING to people MIGRATING their WordPress Installations. Read this to understand how get_option is going to start failing when unserializing binary data from the DB. What I did was to migrate my WordPress the hardcore way: copy all files to the web server, restore the full SQL database … Read more
You are using name in your terms. In default, try to use the existing term id ( in your case, cat ID and tag ID ). If you see https://plugins.trac.wordpress.org/browser/rest-api/trunk/lib/endpoints/class-wp-rest-posts-controller.php#L918 they will handle your term with sanitize them into non-negative integer using absint. I hope this help. Here example code to hook rest_insert_{$this->post_type} to create … Read more
Hopefully someone will extend on my answer…. The critical part of the rest API that is already in core is the registration and routing of endpoints which should look like (taken from http://v2.wp-api.org/extending/adding/) `/** * Grab latest post title by an author! * * @param array $data Options for the function. * @return string|null Post … Read more