Update readme
This commit is contained in:
parent
164aacf4c1
commit
e1395c0c22
|
|
@ -65,6 +65,7 @@ Getting Started
|
|||
'unique-plugin-or-theme-slug'
|
||||
);
|
||||
```
|
||||
Note: If you're using the Composer autoloader, you don't need to explicitly `require` the library.
|
||||
|
||||
#### How to Release an Update
|
||||
|
||||
|
|
@ -79,7 +80,7 @@ By default, the library will check the specified URL for changes every 12 hours.
|
|||
|
||||
#### Notes
|
||||
- The second argument passed to `buildUpdateChecker` must be the absolute path to the main plugin file or any file in the theme directory. If you followed the "getting started" instructions, you can just use the `__FILE__` constant.
|
||||
- The third argument - i.e. the slug - is optional but recommended. If it's omitted, the update checker will use the name of the main plugin file as the slug (e.g. `my-cool-plugin.php` → `my-cool-plugin`). This can lead to conflicts if your plugin has a generic file name like `plugin.php`.
|
||||
- The third argument - i.e. the slug - is optional but recommended. In most cases, the slug should be the same as the name of your plugin directory. For example, if your plugin lives in `/wp-content/plugins/my-plugin`, set the slug to `my-plugin`. If the slug is omitted, the update checker will use the name of the main plugin file as the slug (e.g. `my-cool-plugin.php` → `my-cool-plugin`). This can lead to conflicts if your plugin has a generic file name like `plugin.php`.
|
||||
|
||||
This doesn't affect themes because PUC uses the theme directory name as the default slug. Still, if you're planning to use the slug in your own code - e.g. to filter updates or override update checker behaviour - it can be a good idea to set it explicitly.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue