how to get nonce using json api

You need to call like below. API call:- http://78.47.177.214/blog/api/get_nonce/?json=get_nonce&controller=posts&method=create_post Responce:- {“status”:”ok”,”controller”:”posts”,”method”:”create_post”,”nonce”:”92f31d49b5″}

An Unexpected HTTP Error occurred during the API request

Use the following function to debug the HTTP API request, you will get to know the actual reason why the HTTP API request is failing. Paste the following code in your theme’s function.php. function dump_http_response( $response, $type, $transport, $args, $url ) { if ( is_admin() && $type == “response” ) { echo ‘<span style=”color: #f00;”>’; … Read more

API in numbers?

From quick run of phploc as of current stable version (4.0) there are 2662 functions in WordPress core. Structure Namespaces 0 Interfaces 1 Traits 0 Classes 241 Abstract Classes 4 (1.66%) Concrete Classes 237 (98.34%) Methods 2842 Scope Non-Static Methods 2552 (89.80%) Static Methods 290 (10.20%) Visibility Public Methods 2571 (90.46%) Non-Public Methods 271 (9.54%) … Read more

wp_enqueue_style built in styles

I’m a little confused by your question, can you not simply use wp_enqueue_style, which you actually wrote into this threads heading(not sure if you know the function exists or not). wp_enqueue_style works in the same way as the wp_enqueue_script counterpart, but of course as you’d expect, enqueues stylesheets.. Here’s a list of the enqueues i … Read more

Count posts returned by get_posts in external PHP script

The WordPress function get_posts() is making it’s own instance of WP_Query that is not globally accessible: function get_posts($args = null) { // … cut … $get_posts = new WP_Query; return $get_posts->query($r); } so you could instead try $results = get_posts($args); echo count($results); to give you the array count of post objects returned by get_posts(). WP_Query() … Read more

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