From 703cbd854dbc660de1a943afae9a68a069264e8c Mon Sep 17 00:00:00 2001 From: Yahnis Elsts Date: Wed, 31 Mar 2021 17:30:10 +0300 Subject: [PATCH] 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. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d946c84..ed08b17 100644 --- a/README.md +++ b/README.md @@ -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.