Docs: Imply that the branch name is not optional
The update checker will look for a `master` branch by default, but new repositories use the name `main` instead, and it is technically possible to use any branch as the default branch. So while you don't *have to* set the branch name, it's probably a good idea to always do that.
This commit is contained in:
parent
3155f2d3f1
commit
703cbd854d
|
|
@ -101,12 +101,12 @@ By default, the library will check the specified URL for changes every 12 hours.
|
|||
__FILE__,
|
||||
'unique-plugin-or-theme-slug'
|
||||
);
|
||||
|
||||
//Set the branch that contains the stable release.
|
||||
$myUpdateChecker->setBranch('stable-branch-name');
|
||||
|
||||
//Optional: If you're using a private repository, specify the access token like this:
|
||||
$myUpdateChecker->setAuthentication('your-token-here');
|
||||
|
||||
//Optional: Set the branch that contains the stable release.
|
||||
$myUpdateChecker->setBranch('stable-branch-name');
|
||||
```
|
||||
3. Plugins only: Add a `readme.txt` file formatted according to the [WordPress.org plugin readme standard](https://wordpress.org/plugins/readme.txt) to your repository. The contents of this file will be shown when the user clicks the "View version 1.2.3 details" link.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue