2 2 Registering a Plugin

imath edited this page Jun 20, 2018 · 2 revisions

Making your plugin ready for the Entrepôt.

Entrepôt is using a specific process to install and upgrade the plugin you wish to register. The easiest part of this process is to include in your plugin's main file header tags a new tag containing the URL to your plugin's GitHub repository. Below is the main plugin's file header tags of Entrepôt.

A specific plugin header tag

<?php
/**
 * Plugin Name: Entrepôt
 * Plugin URI: https://github.com/imath/entrepot/
 * Description: Une liste d'extensions gratuites hébergées sur GitHub.com.
 * Version: 1.0.0
 * Requires at least: 4.8
 * Tested up to: 4.8
 * License: GNU/GPL 2
 * Author: imath
 * Author URI: https://imathi.eu/
 * Text Domain: entrepot
 * Domain Path: /languages/
 * Network: True
 * GitHub Plugin URI: https://github.com/imath/entrepot/
 */

As you can see above the new tag to add is GitHub Plugin URI:. This tag is also used by the GitHub updater plugin, so people can always have the choice to use Entrepôt or the GitHub Updater plugin.

Registering to the Entrepôt

To register your plugin you simply need to submit a Pull Request on this repository to add a JSON file containing all the informations Entrepôt will need to install and keep your plugin updated on users' WordPress sites.

This file will need to be added to the /repositories/plugins directory. The name of the JSON file needs to be the same as the slug parameter of the JSON object. For instance the Entrepôt plugin is using /repositories/plugins/entrepot.json as the name for this file.

{
	"name": "Entrepôt",
	"author": "imath",
	"slug": "entrepot",
	"icon": "https://raw.githubusercontent.com/imath/entrepot/master/icon.png",
	"tags": [
	  "plugins",
	  "repositories"
	],
	"country": "fr_FR",
	"releases": "https://github.com/imath/entrepot/releases",
	"issues": "https://github.com/imath/entrepot/issues",
	"description": {
		"en_US" : "Entrepôt, a list of free GitHub.com hosted plugins.",
		"fr_FR" : "Entrepôt, une liste d'extensions gratuites hébergées sur GitHub.com."
	},
	"README": "https://raw.githubusercontent.com/imath/entrepot/master/README.md",
	"urls": {
		"history": "https://raw.githubusercontent.com/imath/entrepot/master/CHANGELOG.md",
		"donate": "https://paypal.me/imath",
		"wiki": "https://github.com/imath/entrepot/wiki"
	}
}

The name, author, slug, releases and issues properties

These properties are required. They will be used in your plugin's card in the Entrepôt tab of the "Add Plugins" Administration screen.

The author property

It needs to be your GitHub username e.g. https://github.com/{username}/{repository}.

The description property

It will be used in your plugin's card in the Entrepôt tab of the "Add Plugins" Administration screen. This is required. You need to include at least the american (en_US) version of the description of your plugin.

The icon property

It will be used in your plugin's card in the Entrepôt tab of the "Add Plugins" Administration screen. This is optional. If not set, a default icon will be used.

The tags property

Unused for now. Depending on the popularity of the Entrepôt and the number of registered plugins, filtering plugins by tags will be implemented.

The README property

Optional (but advised!). Used when a user clicks on the "View details" link of the plugin's row into the "Plugins" Administration screen, or when the user clicks on the "More details" link of the plugin's card into the Entrepôt tab of the "Add Plugins" Administration screen

The dependencies property

Optionnal. Introduced in version 1.1.0. This property allows you to display the plugin dependencies of your plugin. It's an array of objects where the object key is the name of the function that needs to be available for your plugin to run. The value is the plugin name of your dependency. You can have more than one dependency. For instance here is the dependencies parameter of the BP Idea Stream plugin:

"dependencies": [
	{ "bp_get_displayed_user": "BuddyPress 2.6+" },
	{ "wp_idea_stream_upgrade_to_2_4": "WP Idea Stream 2.4+" }
],

The urls property

Optional. Introduced in version 1.2.0. This property allows you to display more links into the modal that pops when a user clicks on the "View details" link of the plugin's row into the "Plugins" Administration screen, or when the user clicks on the "More details" link of the plugin's card into the Entrepôt tab of the "Add Plugins" Administration screen. You can now include a link to the CHANGELOG.md, a donate link, and a link to the Wiki of your repository.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.