WordPress plugin wp-app-json

My first plugin of WordPress. Any comments, requirements, contribution will help.

This plugin provides JSON data to mobile APPs. Here’s the scenarios that you could use this plugin: you want to develop a mobile app or app on mac, and the app is to show the list of your blogs(in category, tag, or keywords), after the app user click one item in the blog list, you would like to show him the detail page of the item, but the logos/banners/sidebar of blog is suitable only for a desktop other than a mobile device or you want to do something different. In the case here, wp_app_json mayble could help.

Documents of WP-APP-JSON

In version 1.0 of WP APP JSON, 2 methods are provided,gl and dt.

Method gl will retrieve posts from the plugin, search results of keywords.


You need to call gl from the URL

  • YOURSECRECTS is the string you set in the configuration.
  • gl will Get List of Posts.
  • p which page of the results. By default, p=0 the method will return the first page of search result.

When gl is called, the following JSON will be returned as example.

{"msg":"1","0":{"ID":238,"title":"title of Post 0","excerpt":"excerpt of post 0...","thumb":"http://www.diaoyuqu.cn/wp-content/uploads/2013/12/17-150x150.jpg"},"1":{"ID":238,"title":"title of Post 1","excerpt":"excerpt of post 1...","thumb":"http://www.diaoyuqu.cn/wp-content/uploads/2013/12/17-150x150.jpg"},... }

Method dt will retrieve specified post from the plugin, by Post ID.

You need to call dt from the URL

  • YOURSECRECTS is the string you set in the configuration.
  • dt will get DeTail of specified post
  • pid is the Post ID you wanted, you can get the Post ID in method gl

NOTE: if you want to change the style in detail page, you need to modify the style.css file.




This plugin is under GPL v2 or later Licence.

Author: Zxial. Code at github. Download @ WP. Project Page: https://zxial.me/projects/wp_app_json/




Fill in your details below or click an icon to log in:

WordPress.com 徽标

您正在使用您的 WordPress.com 账号评论。 登出 /  更改 )

Google photo

您正在使用您的 Google 账号评论。 登出 /  更改 )

Twitter picture

您正在使用您的 Twitter 账号评论。 登出 /  更改 )

Facebook photo

您正在使用您的 Facebook 账号评论。 登出 /  更改 )

Connecting to %s

%d 博主赞过: