New answers tagged

0

Update: From what I've read, you need to do multiple curls to get the access_token, which you then use to do the query Temporary Credentials Acquisition: The client gets a set of temporary credentials from the server. Authorization: The user "authorizes" the request token to access their account. Token Exchange: The client exchanges the short-lived ...


2

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 title for ...


0

Assuming you are using Linux or OS X, the easiest way is probably to use wp-cli (if present in your WordPress installation) to return a list of all posts: wp-cli post list Then pipe it to the word count tool to get the number of lines: wc -l Finally, deduct one to take care of the header line which is not a post: awk '{print $1-1}' So, in one ...



Top 50 recent answers are included