WordPress json-api plugin get recent posts from specified date up to today

I am using a plugin for WordPress called json-api, and it has a function to get recent posts. I am assuming its only called within the last 24 hours, but I wanted to modify it so I could give it a parameter to pull specifically by last 24 hours or 1 for days, then 2 for two days or 48 hours, ect…..

This is the plugin: https://wordpress.org/plugins/json-api/

Read More

I am able to modify the plugin if need too.

This is the function for that:

public function get_recent_posts_by_day() {
global $json_api;
$posts = $json_api->introspector->get_posts();
return $this->posts_result($posts);}

Here is an example link to the plugin for get_recent_posts

I have tried:
http://alexbachuk.com/api/get_recent_posts&after=20140806/

What I want to accomplish is either specifying a date and get all post from that date up until today.

Related posts

1 comment

Comments are closed.