=== WP Plugin Info ===
Contributors: _luigi
Plugin URI: http://wordpress.org/extend/plugins/wp-plugin-info/
Donate link: http://sitetreeplugin.com/contribute/
Tags: api, developer, info, information, plugin, remote, repository, shortcode, tool, wordpress
Requires at least: 3.3
Tested up to: 3.4.1
Stable tag: 1.0
License: GPL v2.0
Lets you retrieve information about a plugin from WordPress.org and show them into a post or page.
== Description ==
*WP Plugin Info* lets you show, in a post or page, any kind of information related to a plugin hosted on WordPress.org.
I developed it for my own use on [sitetreeplugin.com](http://sitetreeplugin.com), the information you see in the sidebar are fetched with this plugin.
= Key Features =
* Shortcode-based plugin: you just need the shortcode `[wp-plugin-info]` to use it.
* The information retrieved are cached and refreshed once per hour. It is able to efficiently manage the caching of multiple arrays of the information (each one related to a different plugin) at the same time.
* Optimised performances: even if you insert the shortcode multiple times into the same page, the access to the cached data will be performed just once.
= Shortcode Attributes =
**`plugin_id`** (Required)
*Description:* The slug name of the plugin whose information you want to retrieve.
*Value:* the basename of the url of the plugin page.
For example, the value of `plugin_id` for this plugin is `wp-plugin-info`, because the url of this plugin page is `http://wordpress.org/extend/plugins/wp-plugin-info/`.
**`info_id`** (Required)
*Description:* The unique identifier associated to the information to retrieve.
*Accepted values:* name, slug, version, author, author_profile, contributors, requires, tested, rating, num_ratings, downloaded, last_updated, added, homepage, download_link, description, installation, screenshots, changelog, faq
**`default`** (Optional)
*Description:* The string to show if an error occurs while retrieving the information.
*Default:* The character "-".
**`date_format`** (Optional)
*Description:* The format of the date to show. This is an attribute to be used only when retrieving a date.
*Value:* A valid [PHP date format](http://codex.wordpress.org/Formatting_Date_and_Time).
= Configuration =
The php constants below can be used to override the cache expiration time and to permanently set the plugin id. It is recommended to define these constants in your `wp-config.php` file instead to directly modifing them in the main plugin file. In the latter case you should set them every time you update the plugin.
* `WPPI_CACHE_EXPIRATION`: cannot be set a value lower than 600 (seconds).
* `WPPI_PLUGIN_ID`: if set, you don't need to include the attribute `plugin_id` into the shortcode. However, The attribute `plugin_id` has an higher priority, so it can override the value of the constant.
= Just an Example =
Suppose you want to show the information listed in the sidebar of [sitetreeplugin.com](http://sitetreeplugin.com) and you set the php constant `WPPI_PLUGIN_ID`, what you would write in a post or page looks like this:
> Version: `[wp-plugin-info info_id="version"]`
> Requires: WordPress `[wp-plugin-info info_id="requires"]` or higher
> Release date: `[wp-plugin-info info_id="last_updated" date_format="Y-n-j"]`
> Downloads: WordPress `[wp-plugin-info info_id="downloaded"]`
== Installation ==
1. Upload the folder `wp-plugin-info` to the `/wp-content/plugins/` directory
1. Activate the plugin through the 'Plugins' menu in WordPress
== Changelog ==
= 1.0 =
* Initial release.