Create a new post from hybrid mobile App in WordPress using JSON API plugin

you can use below plugin for authentication, https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/ OR you need to implement auth by below methods, https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/ When you send request with username and password, you can get token as a response. Then you need to send this token with each request with header like below for the Authentication purpose, syntax : Authorization : … Read more

Create User using JSON API

I’ve never worked with that plugin and a new JSON Rest API will maybe be included in core with one of the future versions. So far it’s as well available as plugin. To make it short: There currently seems to only be three kinds of Controllers in that plugin Core Posts Respond But there’s a … Read more

WP-API restfull JSON and post meta?

Custom posts ignore the normal filter – have a look at class-wp-json-pages.php to see how to do build one for custom posts. <?php /** * Page post type handlers * * @package WordPress * @subpackage JSON API */ /** * Page post type handlers * * This class serves as a small addition on top … Read more

Request object for validate_callback

A quick search through the WP-API source revealed where validate_callback is being used: wp-api/lib/infrastructure/class-wp-rest-request.php $valid_check = call_user_func( $arg[‘validate_callback’], $param, $this, $key ); In this case, $this is an instance of WP_Rest_Request – so there’s one. Now, for sanitize_callback: $this->params[ $type ][ $key ] = call_user_func( $attributes[‘args’][ $key ][‘sanitize_callback’], $value, $this, $key ); Same file, there’s … Read more

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