Linux 软件免费装

WP Plugin Info

开发者 _luigi
更新时间 2013年8月6日 20:56
PHP版本: 3.3 及以上
WordPress版本: 3.5.2
版权: GPL v2.0

标签

plugin wordpress template shortcode tool information api developer info repository remote

下载

1.0 1.1 1.1.1 1.1.2 1.1.3

详情介绍:

BEWARE! Development dropped. It will turn into a Glitch sooner than later. WP Plugin Info 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 sitetreeplugin.com, some of the information shown in the homepage and other areas of the website are fetched with this plugin. Features 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. Template Tags The following tags can be used directly into a template file. <?php wp_plugin_info( $info_id, $args ); ?> $info_id (Required): a string value\ $args (Optional): an associative array `<?php $args = array( 'plugin_id' => WPPI_PLUGIN_ID, 'default' => '-', 'date_format' => null ); ?>` If you want to manipulate the result, use the tag below instead. The arguments are the same. <?php get_wp_plugin_info( $info_id, $args ); ?> Configuration 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.\ It is recommended to define these constants in your wp-config.php 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. In Practice Suppose you want to show the information listed in the homepage of sitetreeplugin.com and you set the php constant WPPI_PLUGIN_ID, what you would write in a post or page should look 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: [wp-plugin-info info_id="downloaded"]
The same can be achieved with the template tag:
Version: <?php wp_plugin_info( 'version' ); ?>\ Requires: WordPress <?php wp_plugin_info( 'requires' ); ?> or higher\ Release date: <?php wp_plugin_info( 'last_updated', array( 'date_format' => 'Y-n-j' ) ); ?>\ Downloads: <?php wp_plugin_info( 'downloaded' ); ?>

安装:

  1. Upload the folder wp-plugin-info to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

升级注意事项:

1.1.3 The cache expiration date is now displayed in the admin area. Minor changes.

更新日志:

1.1.3 1.1.2 Fixed an error in the documentation. 1.1.1 1.1 1.0