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:
Yahnis Elsts 2021-03-31 17:30:10 +03:00 committed by GitHub
parent 3155f2d3f1
commit 703cbd854d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -102,11 +102,11 @@ By default, the library will check the specified URL for changes every 12 hours.
'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.