LLMS_REST_Admin_Form_Controller::handle_key_download()
Generate and download a api key credentials file.
Return Return
(false|void)
Source Source
File: libraries/lifterlms-rest/includes/admin/class-llms-rest-admin-form-controller.php
protected function handle_key_download() { $info = $this->prepare_key_download(); if ( ! $info ) { return false; } header( 'Content-type: text/plain' ); header( 'Content-Disposition: attachment; filename="' . $info['fn'] ); header( 'Pragma: no-cache' ); header( 'Expires: 0' ); // Translators: %s = Consumer Key. printf( __( 'Consumer Key: %s', 'lifterlms' ), $info['ck'] ); echo "\r\n"; // Translators: %s = Consumer Secret. printf( __( 'Consumer Secret: %s', 'lifterlms' ), $info['cs'] ); die(); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.3 | Introduced. |