开发者 |
ndiego
outermostdesign |
---|---|
更新时间 | 2022年12月18日 10:21 |
PHP版本: | 3.6 及以上 |
WordPress版本: | 6.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
Standard Method
The easiest way is to click the new plugin stat icon that is added to the top bar of your WordPress editor. It looks like the standard WordPress plugin icon. This will launch a popup window where you can then choose your settings and enter in the desired plugin slug(s). Click insert, and the generated shortcode will be added to your editor's content field.
Manual Method
If you don't want to bother with the popup window or what to use the shortcode outside the editor, you can manually type out the shortcode. Below is the base shortcode structure with defaults. Technically, "slug" is the only required field. If you enter your plugin's slug, the shortcode will display the number of active installs and cache the data for 43200 seconds (12 hours).
[eps type="single" slug="" field="active_installs" cache="43200" before="" after=""]
type
Optional. The type of stat you wish to display, either a stat from a single plugin or an aggregate stat generated from multiple plugins. Accepts "single" or "aggregate". Defaults to "single".
slug
Required. This is the plugin slug that will be retrieved from the plugin URL on WordPress.org. For example, this plugin's slug is easy-plugin-stats. Accepts any valid plugin slug for "single" or any number of space-separated plugin slugs when using "aggregate". Defaults to null.
field
Optional. The name of the field you have chosen to display. Accepts any of the following fields. Defaults to "active_installs".
The available stat fields for "single" are:
If you have additional questions or would like to request additional features, please let me know in the plugin support forum.