From 4a18a557c796a83c8049ed943bc854ba4ce0be46 Mon Sep 17 00:00:00 2001 From: Ryan Sechrest Date: Thu, 8 Aug 2024 14:59:00 -0400 Subject: [PATCH] Document plugin icon configuration --- README.md | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ef561fa..a6e9c11 100644 --- a/README.md +++ b/README.md @@ -75,14 +75,6 @@ For example, `__FILE__` might resolve to: /var/www/domains/example.org/wp-content/plugins//.php ``` -### Configure: Production Branch (Optional) - -If your production branch is not the default `main`, then specify it: - -```php -$gitHubUpdater->setBranch('master'); -``` - ### Configure: Personal Access Token (Optional) If your GitHub repository is private, then set your access token: @@ -111,6 +103,24 @@ Or save your access token in `wp_options` and pass it via `get_option()`: $gitHubUpdater->setAccessToken(get_option('github_access_token')); ``` +### Configure: Production Branch (Optional) + +If your production branch is not the default `main`, then specify it: + +```php +$gitHubUpdater->setBranch('master'); +``` + +### Configure: Plugin Icon (Optional) + +If you want to use an image within your plugin as the plugin icon, set a relative path (starting from your plugin root) to the file: + +```php +$gitHubUpdater->setPluginIcon('assets/icon.png'); +``` + +This icon appears on Dashboard > Updates next to your plugin when there's a pending update. + ### Add GitHubUpdater (Required) Add all necessary hooks to WordPress to keep your plugin updated moving forward: