ActionScheduler_ListTable::get_log_entry_html()protectedWC 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.

Return

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)
-
$timezone(DateTimezone) (required)
-

ActionScheduler_ListTable::get_log_entry_html() code WC 9.3.3

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() ) );
}