display_name; } else { $by = "#{$code_data[0]}"; } $entry['description'] = sprintf( esc_html__( 'Scan Cancelled by %s', 'better-wp-security' ), $by ); } else { $entry['description'] = esc_html__( 'Scan Failed', 'better-wp-security' ); } } elseif ( 'rescheduling' === $code ) { $entry['description'] = esc_html__( 'Rescheduling', 'better-wp-security' ); } $entry['remote_ip'] = ''; return $entry; } public function filter_entry_for_details_display( $details, $entry, $code, $code_data ) { $entry = $this->filter_entry_for_list_display( $entry, $code, $code_data ); $details['module']['content'] = $entry['module_display']; $details['description']['content'] = $entry['description']; if ( 'changes-found' === $code || 'no-changes-found' === $code ) { $details['memory'] = array( 'header' => esc_html__( 'Memory Used', 'better-wp-security' ), 'content' => sprintf( esc_html_x( '%s MB', 'Megabytes of memory used', 'better-wp-security' ), $entry['data']['memory'] ), ); if ( ! empty( $entry['data']['memory_peak'] ) ) { $details['memory_total'] = array( 'header' => esc_html__( 'Total Memory', 'better-wp-security' ), 'content' => sprintf( esc_html_x( '%s MB', 'Megabytes of memory used', 'better-wp-security' ), $entry['data']['memory_peak'] ), ); } $types = array( 'added' => esc_html__( 'Added', 'better-wp-security' ), 'removed' => esc_html__( 'Removed', 'better-wp-security' ), 'changed' => esc_html__( 'Changed', 'better-wp-security' ), ); foreach ( $types as $type => $header ) { $details[$type] = array( 'header' => $header, 'content' => '
' . implode( "\n", array_keys( $entry['data'][$type] ) ) . '
', ); } } unset( $details['host'] ); return $details; } } new ITSEC_File_Change_Logs();