These docs have been generated using AI. Expect inaccuracies until we remove this banner.
- Docs
- Developers
- Troy Headers
Troy Headers
Troy headers are metadata in your plugin's main file. They tell Troy Client where to find updates.
Troy Header
Points to your Troy Server:
/**
* Plugin Name: My Plugin
* Version: 1.0.0
* Troy: repo.example.com
*/
Troy Client reads this and checks https://repo.example.com/ for updates.
URL Formats
All of these work:
| You Write | Troy Uses |
|---|---|
repo.example.com | https://repo.example.com/ |
example.com/troy | https://example.com/troy/ |
http://example.com | https://example.com/ |
HTTPS is always enforced. Maximum 191 characters.
Special Value
Troy: disable-all-communications
Hides your plugin from all external API requests, including WordPress.org. Use this for private plugins you don't want exposed anywhere.
Troy Dependencies Header
Declares plugins your plugin requires:
/**
* Troy: repo.example.com
* Troy Dependencies: required-plugin, another-plugin
*/
Dependencies from different servers:
/**
* Troy Dependencies: local-plugin, external-plugin <other-server.com>
*/
Maximum 5 dependencies. See Dependencies.
Troy Dependency Header
Singular form—identical behavior, just grammatically nicer for one dependency:
/**
* Troy Dependency: required-plugin
*/
Both Troy Dependency: and Troy Dependencies: are accepted. Use whichever reads better.
How Troy Client Uses These
- Scans all installed plugins
- Reads the
Troyheader - Groups plugins by server
- Checks each server for updates
- Omits Troy-enabled plugins from WordPress.org requests
That last point matters: WordPress.org won't see your Troy-enabled plugins. Your users' plugin lists stay private.
