[Plugin: JSON API] Add meta query to get_post
-
This plugin is just awesome!
I needed meta query for a project so I added meta_key and meta_value to get_post method
In file core.php I added to line 38
extract($json_api->query->get(array('id', 'slug', 'post_id', 'post_slug', 'meta_key', 'meta_value')));
and on line 53
} else if ($meta_key && $meta_value) { $posts = $json_api->introspector->get_posts(array( 'meta_key' => $meta_key, 'meta_value' => $meta_value ));
Now you can query by meta data as
/api/get_post/?meta_key=test&meta_value=cool
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: JSON API] Add meta query to get_post’ is closed to new replies.