ActionScheduler_ListTable::get_log_entry_htmlprotectedWC 1.0

Prints the logs entries inline. We do so to avoid loading Javascript and other hacks to show it in a modal.

Method of the class: ActionScheduler_ListTable{}

No Hooks.

Returns

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_log_entry_html( $log_entry, $timezone );
$log_entry(ActionScheduler_LogEntry) (required)
Log entry object.
$timezone(DateTimezone) (required)
Timestamp.

ActionScheduler_ListTable::get_log_entry_html() code WC 9.9.5

protected function get_log_entry_html( ActionScheduler_LogEntry $log_entry, DateTimezone $timezone ) {
	$date = $log_entry->get_date();
	$date->setTimezone( $timezone );
	return sprintf( '<li><strong>%s</strong><br/>%s</li>', esc_html( $date->format( 'Y-m-d H:i:s O' ) ), esc_html( $log_entry->get_message() ) );
}