edd_get_download_token( string $url = '' )
Generates a token for a given URL.
Description Description
An ‘o’ query parameter on a URL can include optional variables to test against when verifying a token without passing those variables around in the URL. For example, downloads can be limited to the IP that the URL was generated for by adding ‘o=ip’ to the query string.
Or suppose when WordPress requested a URL for automatic updates, the user agent could be tested to ensure the URL is only valid for requests from that user agent.
Parameters Parameters
- $url
-
(Optional) The URL to generate a token for.
Default value: ''
Return Return
(string) The token for the URL.
Source Source
File: includes/download-functions.php
Changelog Changelog
Version | Description |
---|---|
2.3 | Introduced. |