2 4 Registering a Theme

imath edited this page Jun 20, 2018 · 1 revision

Making your theme ready for the Entrepôt.

Since version 1.4.0 of the Entrepôt, you can know register Themes.

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

A specific theme header tag

<?php
/**
 * Theme Name: Vingt DixSept
 * Theme URI: https://github.com/imath/vingt-dixsept
 * Author: imath
 * Author URI: https://imathi.eu
 * Description: Un « gamin » de TwentySeventeen qui se concentre sur la mise en valeur des e-mails de votre site.
 * Version: 1.1.2
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: vingt-dixsept
 * Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
 * Template: twentyseventeen
 *
 * GitHub Theme URI: https://github.com/imath/vingt-dixsept
 *
 * Ce thème, tout comme WordPress, utilise la licence GPL.
 */

As you can see above the new tag to add is GitHub Theme URI:.

Registering to the Entrepôt

To register your theme 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 theme updated on users' WordPress sites.

This file will need to be added to the /repositories/themes directory. The name of the JSON file needs to be the same as the slug parameter of the JSON object. For instance the Vingt DixSept Theme is using /repositories/themes/vingt-dixsept.json as the name for this file.

{
	"name": "Vingt DixSept",
	"author": "imath",
	"slug": "vingt-dixsept",
	"screenshot": "https://raw.githubusercontent.com/imath/vingt-dixsept/master/screenshot.jpg",
	"tags": [
		"one-column",
		"two-columns",
		"right-sidebar",
		"flexible-header",
		"accessibility-ready",
		"custom-colors",
		"custom-header",
		"custom-menu",
		"custom-logo",
		"editor-style",
		"featured-images",
		"footer-widgets",
		"post-formats",
		"rtl-language-support",
		"sticky-post",
		"theme-options",
		"threaded-comments",
		"translation-ready"
	],
	"template": "twentyseventeen",
	"country": "fr_FR",
	"releases": "https://github.com/imath/vingt-dixsept/releases",
	"issues": "https://github.com/imath/vingt-dixsept/issues",
	"description": {
        	"en_US" : "A TwentySeventeen's \"kid\" which focuses on making your WordPress emails prettier.",
        	"fr_FR" : "Un « gamin » de TwentySeventeen qui se concentre sur la mise en valeur des e-mails de votre site."
	},
	"README": "https://raw.githubusercontent.com/imath/vingt-dixsept/master/README.md",
	"urls": {
        	"history": "https://raw.githubusercontent.com/imath/vingt-dixsept/master/CHANGELOG.md",
        	"donate": "https://paypal.me/imath",
        	"preview_url": ""
    	}
}

The name, author, slug, releases and issues properties

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

The author property

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

The template property

If your theme is a child theme, you need to fill this property with the slug of an existing Theme into the WordPress.org repository your theme is a child of.

The description property

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

The screenshot property

It will be used in your theme's card in the Entrepôt tab of the "Add Themes" Administration screen. This is required. It needs to be a png or a jpg image.

The tags property

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

The README property

Optional (but advised!). Used when a user clicks on the "Details" link of the theme's row into the "Themes" Administration screen.

The urls property

Optional. This property allows you to display more links into the modal that pops when a user clicks on the "View details" link of the theme's row into the "Themes" Administration screen. You can include a link to the CHANGELOG.md, a donate link, a link to the Wiki of your repository. If you wish to show a preview of your theme, you can also add a preview_url parameter containing a link to the site that is using your theme.

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.