Skip to content

Commit

Permalink
Document plugin icon configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansechrest authored Aug 8, 2024
1 parent c91bdb7 commit 4a18a55
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,6 @@ For example, `__FILE__` might resolve to:
/var/www/domains/example.org/wp-content/plugins/<pluginDir>/<pluginSlug>.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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 4a18a55

Please sign in to comment.