-
Categories
Archives
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- September 2006
- August 2006
- July 2006
WP-JSON
WP-JSON is a plugin that easily enables you start syndicating your blog entries using JSON. This enables third party integration with JavaScript solutions cross domain without use of proxy. Supports JSON-callback parameter. If mod_rewrite permalinks are enabled call /feed/json/?callback=METHOD and if mod_rewrite is disabled call using ?feed=json&callback=METHOD
Inspired by this blog post but now bundled as a plugin and with support for PHP installations lower than 5.2.0.
Example of usage when activated
$(function(){ $("body").append('<div id="wp-json">Loading JSON</div>'); $("#wp-json").css({ 'position' : 'fixed', 'right' : '0px', 'top' : '0px', 'background' : '#f00' }); $.getJSON('http://frontendbook.com/feed/json/?callback=?', function(json){ var result = '<ul>'; $.each(json.items, function(){ result += '<li><a href="' + this.link \ + '">' + this.title + '</a></li>'; }) result += '</ul>'; $("#wp-json").css({ 'background' : '#fff' }).html(result); }); });