• Resolved johngorenfeld

    (@johngorenfeld)


    How would I modify the great JSON API plugin to provide just one more piece of information about the post: specifically the post-3.1 feature of post_format, as in “Video,” “Link,” “Quote”?

    Having used the older version of the plugin, I am disoriented and confused by the new one’s object-oriented references to a Controller. Is that something that’s easy to extend with a WP hook? Could someone provide an example of a hook function that would add in this additional bit of post information? Any help much appreciated.

    John

    http://ww.wp.xz.cn/plugins/json-api/

Viewing 1 replies (of 1 total)
  • Thread Starter johngorenfeld

    (@johngorenfeld)

    Hi everyone, I figured out the answer and am posting it here for future developers.

    From the manual, I had a hard time figuring out whether any of the hooks would be suitable for my goal, which was to get extra post information about post_format. So I ended up adding lines to the actual Post model: models/post.php.

    Is there a filter or hook that would do this? Maybe by extending the Post object?

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: JSON API] Adding extra things, i.e. "post_format," to the JSON output’ is closed to new replies.