Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Admin_Page_Status::remove_log_file()
Delete a log file
Description Description
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.page.status.php
private static function remove_log_file() { if ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'delete_log' ) ) { wp_die( __( 'Action failed. Please refresh the page and retry.', 'lifterlms' ) ); } if ( ! empty( $_REQUEST['llms_delete_log'] ) ) { $logs = self::get_logs(); $handle = sanitize_title( $_REQUEST['llms_delete_log'] ); $log = isset( $logs[ $handle ] ) ? $logs[ $handle ] : false; if ( ! $log ) { return; } $file = LLMS_LOG_DIR . $log; if ( is_file( $file ) && is_writable( $file ) ) { unlink( $file ); wp_safe_redirect( esc_url_raw( self::get_url( 'logs' ) ) ); exit(); } } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.11.2 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: