< All Topics
Print

Usage

Naming Conventions

Folder/Directory slugs and plugin/theme slugs must be identical and must be lowercase. Otherwise, updating, branch switching, etc. may not function correctly. Git Updater will make every effort to correct improper naming that may result from uploading zip files for installation, though this will only happen during an update, a branch switch, or an install.

Repository names, which are used for folder/directory slugs, must be lowercase. Any mixed case slugs will be converted by WordPress sanitization functions to lowercase. This will cause issues when saving data to the database. Especially when saving repository specific data.

I am following the WordPress Plugin Directory naming guidelines.

By convention, the main plugin file or theme style.css file may not be in a subfolder. It must be in the root of the directory.

No two slugs may be identical. This also means a plugin slug and a theme slug cannot be identical.

Example for naming conventions

As an example, if the repository for plugin you want to install and update with the Git Updater is located at https://github.com/user/good-plugin, its directory and file structure should look something like this:

├── good-plugin.php
├── readme.txt
├── README.md
├── CHANGES.md
├── includes
|    ├── ...
|    └── queries.php
├── ...
└── ...

Plugins

There must be a GitHub Plugin URI, Bitbucket Plugin URI, GitLab Plugin URI, or Gitea Plugin URI declaration in the plugin’s header.

/**
 * Plugin Name:       Git Updater
 * Plugin URI:        https://github.com/afragen/git-updater
 * Description:       A plugin to automatically update GitHub, Bitbucket or GitLab hosted plugins and themes. It also allows for remote installation of plugins or themes into WordPress.
 * Version:           10.0.0
 * Author:            Andy Fragen
 * License:           MIT
  * Domain Path:       /languages
 * Text Domain:       git-updater
 * GitHub Plugin URI: https://github.com/afragen/git-updater
 * GitHub Languages:  https://github.com/afragen/git-updater-translations
 */

Themes

There must be a GitHub Theme URI, Bitbucket Theme URI, GitLab Theme URI, or Gitea Theme URI declaration in the style.css file. When initially adding a theme, the directory must be identical to the repo name.

/**
 * Theme Name:       Test
 * Theme URI:        http://thefragens.net/
 * Version:          0.1.0
 * Description:      Child theme of TwentyTwelve.
 * Author:           Andy Fragen
 * Template:         twentytwelve
 * Template Version: 1.0.0
 * GitHub Theme URI: https://github.com/afragen/test-child
 */

Bitbucket Support

Instead of the GitHub Plugin URI header you will need to use the Bitbucket Plugin URI header.

Instead of the GitHub Theme URI header you will need to use the Bitbucket Theme URI header.

GitLab Support

Instead of the GitHub Plugin URI header you will need to use the GitLab Plugin URI header.

Instead of the GitHub Theme URI header you will need to use the GitLab Theme URI header.

You must set a GitLab private token or a GitLab personal access token.

Currently GitLab personal access tokens contain an automatic 4 week expiration. Consider changing the expiration date when creating the access token.

  • Go to your GitLab Settings page under the Account tab. From here you can retrieve or reset your GitLab access token.
  • Go to your GitLab Profile Settings page under the Access Tokens tab. From here you can create a personal access token.

Gitea Support

Instead of the GitHub Plugin URI header you will need to use the Gitea Plugin URI header.

Instead of the GitHub Theme URI header you will need to use the Gitea Theme URI header.

You must set a Gitea access token.

  • Go to your Gitea Settings page under the Account tab. From here you can retrieve or reset your GitLab access token.

Gist Support

Instead of the GitHub Plugin URI header you will need to use the Gist Plugin URI header.

Instead of the GitHub Theme URI header you will need to use the Gist Theme URI header.

Table of Contents