WordPress.org

Support

Support » Plugins and Hacks » [Plugin: JSON API] get_recent_posts full article instead of excerpt

[Plugin: JSON API] get_recent_posts full article instead of excerpt

  • Does anyone know if it’s possible to get the full post for get_recent_posts instead of just the excerpt. I tried something like this in my functions.php file but it didn’t work:

    add_action('json_api-core-get_recent_posts', 'my_get_recent_posts');
    function my_get_recent_posts(){
    	global $more;
    	$more = 0;
    	return;
    }

    http://wordpress.org/extend/plugins/json-api/

Viewing 1 replies (of 1 total)
  • I found a way to do this but it requires modifying some of the plugin code. Edit the introspector.php in the singletons folder and change the following from this (starting on line 6):

    global $post;
    $this->set_posts_query($query);
    $output = array();

    to this:

    global $post, $more;
    $this->set_posts_query($query);
    $output = array();
    $more = -1;

    Setting the $more variable to -1 tells wordpress to output the full article regardless if there is a more tag or not.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: JSON API] get_recent_posts full article instead of excerpt’ is closed to new replies.