{"id":19030,"date":"2012-07-14T09:29:31","date_gmt":"2012-07-14T09:29:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-plugin-info\/"},"modified":"2013-08-06T12:56:20","modified_gmt":"2013-08-06T12:56:20","slug":"wp-plugin-info","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/wp-plugin-info\/","author":9484584,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.3","stable_tag":"1.1.3","tested":"3.5.2","requires":"3.3","requires_php":"","requires_plugins":"","header_name":"WP Plugin Info","header_author":"Luigi Cavalieri","header_description":"","assets_banners_color":"","last_updated":"2013-08-06 12:56:20","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/wp-plugin-info\/","header_author_uri":"http:\/\/profiles.wordpress.org\/_luigi","rating":5,"author_block_rating":0,"active_installs":10,"downloads":1574,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":{"1.1.3":"<p>The cache expiration date is now displayed in the admin area. Minor changes.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.1.1","1.1.2","1.1.3"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[1556,2275,4473,1641],"plugin_category":[43,59],"plugin_contributors":[79381],"plugin_business_model":[],"class_list":["post-19030","plugin","type-plugin","status-closed","hentry","plugin_tags-api","plugin_tags-developer","plugin_tags-info","plugin_tags-information","plugin_category-customization","plugin_category-utilities-and-tools","plugin_contributors-_luigi","plugin_committers-_luigi"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wp-plugin-info.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>BEWARE! Development dropped. It will turn into a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Glitch\">Glitch<\/a> sooner than later.<\/strong><\/p>\n\n<p><em>WP Plugin Info<\/em> is addressed mainly to plugin developers. It 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 <a href=\"http:\/\/sitetreeplugin.com\">sitetreeplugin.com<\/a>, some of the information shown in the homepage and other areas of the website are fetched with this plugin.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Shortcode-based plugin: you just need the shortcode <code>[wp-plugin-info]<\/code> to use it.<\/li>\n<li>The information retrieved are cached and refreshed once per hour. It is able to efficiently manage the caching of multiple arrays of information (each one related to a different plugin) at the same time.<\/li>\n<li>Optimised performance: even if you insert the shortcode multiple times into the same page, the access to the cached data will be performed just once.<\/li>\n<li>Template tags to use the plugin directly into a template file.<\/li>\n<\/ul>\n\n<h4>Shortcode Attributes<\/h4>\n\n<p><strong><code>plugin_id<\/code><\/strong> (Required)<br \/>\n<em>Description:<\/em> The slug name of the plugin whose information you want to retrieve.<br \/>\n<em>Value:<\/em> the basename of the url of the plugin page.<\/p>\n\n<p>For example, the value of <code>plugin_id<\/code> for this plugin is <code>wp-plugin-info<\/code>, because the url of this plugin page is <code>http:\/\/wordpress.org\/extend\/plugins\/wp-plugin-info\/<\/code>.<\/p>\n\n<p><strong><code>info_id<\/code><\/strong> (Required)<br \/>\n<em>Description:<\/em> The unique identifier associated to the information to retrieve.<br \/>\n<em>Accepted values:<\/em> name, slug, version, author, author_profile, contributors, requires, tested, rating, num_ratings, downloaded, last_updated, added, homepage, download_link, description, installation, screenshots, changelog, faq<\/p>\n\n<p><strong><code>default<\/code><\/strong> (Optional)<br \/>\n<em>Description:<\/em> The string to show if an error occurs while retrieving the information.<br \/>\n<em>Default:<\/em> The character \"-\".<\/p>\n\n<p><strong><code>date_format<\/code><\/strong> (Optional)<br \/>\n<em>Description:<\/em> The format of the date to show. This is an attribute to be used only when retrieving a date.<br \/>\n<em>Value:<\/em> A valid <a href=\"http:\/\/codex.wordpress.org\/Formatting_Date_and_Time\">PHP date format<\/a>.<\/p>\n\n<h4>Template Tags<\/h4>\n\n<p>The following tags can be used directly into a template file.<\/p>\n\n<pre><code>&lt;?php wp_plugin_info( $info_id, $args ); ?&gt;\n<\/code><\/pre>\n\n<p><em>$info_id<\/em> (Required): a string value<br \/>\n<em>$args<\/em> (Optional): an associative array<\/p>\n\n<pre><code>&lt;?php\n\n$args = array(\n    'plugin_id'   =&gt; WPPI_PLUGIN_ID,\n    'default'     =&gt; '-',\n    'date_format' =&gt; null\n);\n\n?&gt;\n<\/code><\/pre>\n\n<p>If you want to manipulate the result, use the tag below instead. The arguments are the same.<\/p>\n\n<pre><code>&lt;?php get_wp_plugin_info( $info_id, $args ); ?&gt;\n<\/code><\/pre>\n\n<h4>Configuration<\/h4>\n\n<p>The plugin is ready to use just after its activation, however, there are a couple settings you can customise through the php constants listed below.<br \/>\nIt is recommended to define these constants in your <code>wp-config.php<\/code> file instead of directly editing them in the main plugin file. In the latter case you should set them every time you update the plugin.<\/p>\n\n<ul>\n<li><code>WPPI_CACHE_EXPIRATION<\/code>: cannot be set a value lower than 600 (seconds).<\/li>\n<li><code>WPPI_PLUGIN_ID<\/code>: if set, you don't need to include the attribute <code>plugin_id<\/code> into the shortcode. However, The attribute <code>plugin_id<\/code> has an higher priority, so it can override the value of the constant.<\/li>\n<li><code>WPPI_ENABLE_SHORTCODE<\/code>: the default value is <code>true<\/code>. Set it to <code>false<\/code> if you want to disable the shortcode feature \u2013 recommended if you don't use it.<\/li>\n<\/ul>\n\n<h4>In Practice<\/h4>\n\n<p>Suppose you want to show the information listed in the homepage of sitetreeplugin.com and you set the php constant <code>WPPI_PLUGIN_ID<\/code>, what you would write in a post or page should look like this:<\/p>\n\n<blockquote>\n  <p>Version: <code>[wp-plugin-info info_id=\"version\"]<\/code><br \/>\n  Requires: WordPress <code>[wp-plugin-info info_id=\"requires\"]<\/code> or higher<br \/>\n  Release date: <code>[wp-plugin-info info_id=\"last_updated\" date_format=\"Y-n-j\"]<\/code><br \/>\n  Downloads: <code>[wp-plugin-info info_id=\"downloaded\"]<\/code><\/p>\n<\/blockquote>\n\n<p>The same can be achieved with the template tag:<\/p>\n\n<blockquote>\n  <p>Version: <code>&lt;?php wp_plugin_info( 'version' ); ?&gt;<\/code><br \/>\n  Requires: WordPress <code>&lt;?php wp_plugin_info( 'requires' ); ?&gt;<\/code> or higher<br \/>\n  Release date: <code>&lt;?php wp_plugin_info( 'last_updated', array( 'date_format' =&gt; 'Y-n-j' ) ); ?&gt;<\/code><br \/>\n  Downloads: <code>&lt;?php wp_plugin_info( 'downloaded' ); ?&gt;<\/code><\/p>\n<\/blockquote>\n\n<!--section=installation-->\n<ol>\n<li>Upload the folder <code>wp-plugin-info<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.1.3<\/h4>\n\n<ul>\n<li>The cache expiration date is now displayed in the admin area.<\/li>\n<li>Minor changes.<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<p>Fixed an error in the documentation.<\/p>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Added the template tag <code>get_wp_plugin_info()<\/code><\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Reduced the number of database queries performed in the worst case.<\/li>\n<li>Added a button to delete the cache.<\/li>\n<li>Added the template tag <code>wp_plugin_info()<\/code>.<\/li>\n<li>Added the configuration constant <code>WPPI_ENABLE_SHORTCODE<\/code>.<\/li>\n<li>Minor fixes.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Lets you retrieve information about a plugin from WordPress.org and show them into a post or page.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/19030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=19030"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/_luigi"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=19030"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=19030"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=19030"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=19030"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=19030"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=19030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}