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::output_logs_content()
Output the HTML for the Logs tab
Description Description
Return Return
(void)
Source Source
File: includes/admin/class.llms.admin.page.status.php
private static function output_logs_content() { $logs = self::get_logs(); $date_format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' ); $current = llms_filter_input( INPUT_POST, 'llms_log_file', FILTER_SANITIZE_STRING ); if ( $logs && ! $file ) { $log_keys = array_keys( $logs ); $current = array_shift( $log_keys ); } if ( $logs ) : ?> <form action="<?php echo esc_url( self::get_url( 'logs' ) ); ?>" method="POST"> <select name="llms_log_file"> <?php foreach ( $logs as $name => $file ) : ?> <option value="<?php echo esc_attr( $name ); ?>" <?php selected( sanitize_title( $current ), $name ); ?>> <?php echo esc_html( $file ); ?> (<?php echo date_i18n( $date_format, filemtime( LLMS_LOG_DIR . $file ) ); ?>) </option> <?php endforeach; ?> </select> <button class="llms-button-secondary small" type="submit"><?php _e( 'View Log', 'lifterlms' ); ?></button> </form> <h2> <?php printf( esc_html__( 'Viewing: %s', 'lifterlms' ), $logs[ $current ] ); ?> <a class="llms-button-danger small" href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'llms_delete_log' => $current, ), admin_url( 'admin.php?page=llms-status&tab=logs' ) ), 'delete_log' ) ); ?>""><?php _e( 'Delete Log', 'lifterlms' ); ?></a> </h2> <div class="llms-log-viewer"> <pre><?php echo esc_html( file_get_contents( LLMS_LOG_DIR . $logs[ $current ] ) ); ?></pre> </div> <?php else : ?> <div class="updated"><p><?php _e( 'There are currently no logs to view.', 'lifterlms' ); ?></p></div> <?php endif; }
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: