llms_cleanup_tmp()
Cron function to cleanup files in the LLMS_TMP_DIR Removes any files that are more than a day old
Description Description
Return Return
(void)
Source Source
File: includes/llms.functions.core.php
function llms_cleanup_tmp() { $max_age = llms_current_time( 'timestamp' ) - apply_filters( 'llms_tmpfile_max_age', DAY_IN_SECONDS ); $exclude = array( '.htaccess', 'index.html' ); foreach ( glob( LLMS_TMP_DIR . '*' ) as $file ) { // dont cleanup index and .htaccess if ( in_array( basename( $file ), $exclude ) ) { continue; } if ( filemtime( $file ) < $max_age ) { wp_delete_file( $file ); } } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.18.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: