File_Download::should_download()
Whether this is a legitimate download request.
Return
(bool) If the download should continue.
Source
File: src/Events/Custom_Tables/V1/Migration/CSV_Report/File_Download.php
public function should_download() {
if ( ! isset( $_GET['wpnonce'] ) || ! isset( $_GET[ self::DOWNLOAD_QUERY_PARAM ] ) || ( $_GET[ self::DOWNLOAD_QUERY_PARAM ] !== self::DOWNLOAD_SLUG ) ) {
return false;
}
return (bool) wp_verify_nonce( $_GET['wpnonce'] );
}
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |