Skip to content

Commit 70bf132

Browse files
committed
Document methods for configuring plugin banner and changelog
1 parent 3be216c commit 70bf132

File tree

1 file changed

+52
-13
lines changed

1 file changed

+52
-13
lines changed

README.md

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ Version: 1.0.0
1616

1717
Version is used to compare the installed plugin with the latest one on GitHub to determine if there are updates.
1818

19-
### Plugin URI (Required)
20-
21-
Specify URL to your plugin's changelog. For example:
22-
23-
```
24-
Plugin URI: https://ryansechrest.github.io/github-updater-demo
25-
```
26-
27-
Page will be embedded in a modal when viewing plugin details.
28-
2919
### Update URI (Required)
3020

3121
Specify URL to your plugin's repository on GitHub. For example:
@@ -113,13 +103,59 @@ $gitHubUpdater->setBranch('master');
113103

114104
### Configure: Plugin Icon (Optional)
115105

116-
If you want to use an image within your plugin as the plugin icon, set a relative path to the file:
106+
Specify a relative path from the plugin root to configure a plugin icon:
117107

118108
```php
119109
$gitHubUpdater->setPluginIcon('assets/icon.png');
120110
```
121111

122-
The path should be relative from your plugin root. The icon appears on Dashboard > Updates next to your plugin.
112+
The icon appears on Dashboard > Updates next to your plugin.
113+
114+
### Configure: Small Plugin Banner (Optional)
115+
116+
Specify a relative path from the plugin root to configure a small plugin banner:
117+
118+
```php
119+
$gitHubUpdater->setPluginBannerSmall('assets/banner-772x250.jpg');
120+
```
121+
122+
The banner will appear in the modal when clicking [View details] on your plugin.
123+
124+
### Configure: Large Plugin Banner (Optional)
125+
126+
Specify a relative path from the plugin root to configure a large plugin banner:
127+
128+
```php
129+
$gitHubUpdater->setPluginBannerLarge('assets/banner-1544x500.jpg');
130+
```
131+
132+
The banner will appear in the modal when clicking [View details] on your plugin.
133+
134+
### Configure: Changelog (Optional)
135+
136+
Specify a relative path from the plugin root to your changelog:
137+
138+
```php
139+
$gitHubUpdater->setChangelog('CHANGELOG.md');
140+
```
141+
142+
This should be a Markdown file and will populate the Changelog tab when clicking
143+
[View details] on your plugin. `GitHubUpdater` will use the most recent file from
144+
GitHub so that a user can review changes before updating.
145+
146+
The Markdown to HTML converter currently only supports:
147+
148+
- Headers (`#`, `##`, `###`, etc.)
149+
- Unordered lists (`-`)
150+
- Blockquotes (`>`)
151+
- Code blocks (using three backticks to start and end block)
152+
- Paragraphs
153+
154+
And only formats:
155+
156+
- Bold text (`**Foo**`)
157+
- Italic text (`*Foo*`)
158+
- Code (using single backtick to wrap text)
123159

124160
### Add GitHubUpdater (Required)
125161

@@ -133,4 +169,7 @@ This should be the last method call after `GitHubUpdater` has been configured.
133169

134170
## Final Thoughts
135171

136-
If you want a deep dive into how `GitHubUpdater` works, check out this [blog post](https://ryansechrest.com/2024/04/how-to-enable-wordpress-to-update-your-custom-plugin-hosted-on-github/).
172+
If you want a deep dive into how `GitHubUpdater` works, check out this
173+
[blog post](https://ryansechrest.com/2024/04/how-to-enable-wordpress-to-update-your-custom-plugin-hosted-on-github/).
174+
That said, while the fundamentals in the blog post are still being used,
175+
`GitHubUpdater` has changed quite a bit since it was written.

0 commit comments

Comments
 (0)