A | B | C | D | E | F | |
---|---|---|---|---|---|---|
1 | Field | Type | Description | Example | Required | Used in |
2 | name | string | The name of the plugin. | "Example Plugin" | Required | Plugin information |
3 | slug | string | A lower-case string that uniquely identifies the plugin. | "example-plugin" | Optional | Updates and plugin information. |
4 | version | string | The version number of the latest release. | "1.2.3" | Required | Updates and plugin information. |
5 | download_url | string | The download URL for the latest version of the plugin. This URL must point to a valid ZIP file that's structured in the same way as the plugin ZIPs from the official WordPress.org plugin directory. Specifically, the .zip archive should contain a single directory whose name matches the plugin's slug. The rest of the plugin's files should be contained within that directory. | "http://example.com/example-plugin.zip" | Required | Updates and plugin information |
6 | sections | object | This field specifies the captions and contents of all tabs displayed in the "Plugin Information" dialog. Each sub-field becomes a new tab, with the field name as the caption and the field value as the tab's contents. When converting field names to tab captions, WordPress will automatically replace any underscores with spaces and upper-case the first letter of each word. For example "installation_notes" will become "Installation Notes". HTML is allowed in all sections, but certain tags may be filtered out. Alas, I can't be bothered to pore through the WP source to find out which those are. At the very least, paragraphs, basic typography and lists appear to work fine. The only required entry is 'description', but you can also specify any number of other tabs. Common examples are 'changelog' and 'installation'. | { "description" : "foo", "changelog" : "bar", "custom_section" : "<em>baz</em>" } | Required | Plugin information |
7 | homepage | string | Plugin's home page URL. | "http://example.com/" | Optional | Updates and plugin information. |
8 | requires | string | The lowest version of WordPress that the plugin will work on. | "4.0" | Optional | Plugin information |
9 | tested | string | The highest version that you've successfully used to test the plugin. | "4.9.6" | Optional | Plugin information |
10 | requires_php | string | Minimum required version of PHP. | "5.6" | Optional | Updates and plugin information |
11 | author | string | Author's name. | "John Smith" | Optional | Plugin information |
12 | author_homepage | string | Author's homepage URL | "http://example.com/" | Optional | Plugin information |
13 | last_updated | string | A date string indicating when the plugin was last updated. It is usually specified as YYYY-MM-DD, but other date/time formats may also work. | "2016-05-05 18:11:00" | Optional | Plugin information |
14 | upgrade_notice | string | A short description of why the user should upgrade. According to the readme.txt docs on WordPress.org, this field should be no more than 300 characters. | "Arbitrary text here" | Optional | Updates |
15 | rating | float | The average user rating for the plugin, on the scale of 1 to 100. This field generally makes no sense for plugins not hosted on WordPress.org and thus can be safely omitted. | 75 | Optional | Plugin information |
16 | num_ratings | int | The number of users who've rated the plugin. Again, this field can be safely omitted. | 123 | Optional | Plugin information |
17 | downloaded | int | The number of times the plugin has been downloaded. Like 'rating' and 'num_ratings', this field will be useless for most privately hosted plugins - but it's there if you want it. | 456 | Optional | Plugin information |
18 | active_installs | int | The number of sites that use the plugin. Note that plugins hosted on wordpress.org only report approximate stats - for example, 10000 instead of 12450. It's up to you whether you want to do the same, report the exact number of installs, or omit this field entirely. | 10000 | Optional | Plugin information |
19 | banners | object | The URL of the plugin banner. The banner will be displayed at the top of the "View version 1.2.3 details" pop-up. The "banners" object should contain two fields - "low" and "high". The "low" field must contain a URL that points to a 772x250 pixel image (PNG or JPG). The "high" URL must point to a 1544x500 version of the same image (this will be used on high-DPI screens). Only one of "low" or "high" is required. | { "low" : "http://example.com/banner-772x250.png", "high" : "http://example.com/banner-1544x500.png" } | Optional | Plugin information |
20 | icons | object | The URL(s) of the plugin icon. This icon will be displayed when a plugin update is shown on the "Dashboard -> Updates" page. The "icons" object should contain up to three fields: "1x", "2x", "svg". All of the fields are optional. They should point to different versions of the same icon: - "1x": a 128x128 px image. - "2x": a 256x256 px image for HiDPI screens. - "svg": a vector version of the icon. See WordPress.org for more information on supported icon sizes and image formats: https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/#plugin-icons | { "1x" : "http://example.com/assets/icon-128x128.png", "2x" : "http://example.com/assets/icon-256x256.png", "svg": "http://example.com/assets/icon.svg" } | Optional | "Dashboard -> Updates" page |
21 | translations | array | A list of available language packs. Language packs are translations that can be installed and updated independently the plugin itself. See wordpress.org documentation on plugin internationalization for more details. The "translations" array should contain zero or more objects with the following fields: "language" - gettext locale name. "updated" - Translation update timestamp. Any format that's supported by PHP's strtotime() function will work, but the timestamp must be correct or translation updates won't work properly. "package" - The URL of the language pack. It must be a ZIP archive that contains two files: "plugin-slug-aa_BB.po" and "plugin-slug-aa_BB.mo" (where "aa_BB" is the locale name). "version" - The plugin version that this translation applies to. Optional. At the time of this writing, WordPress didn't actually use this version number for anything. | [ { "language" : "fr_FR", "updated" : "2015-04-22 23:22:42", "package" : "http://example.com/example-plugin-fr_FR.zip", "version" : "1.0" }, { "language" : "de_DE", "updated" : "2016-05-05 16:48:00", "package" : "http://example.com/another-translation.zip", "version" : "2.0" } ] | Optional | Translation updates |