ActionScheduler_WPCLI_Command::get_schedule_display_string
Get the scheduled date in a human friendly format.
Метод класса: ActionScheduler_WPCLI_Command{}
Хуков нет.
Возвращает
string.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_schedule_display_string( $schedule );
- $schedule(ActionScheduler_Schedule) (обязательный)
- Schedule.
Заметки
| Смотрите: ActionScheduler_ListTable::get_schedule_display_string() |
Код ActionScheduler_WPCLI_Command::get_schedule_display_string() ActionScheduler WPCLI Command::get schedule display string WC 11.1.0
protected function get_schedule_display_string( ActionScheduler_Schedule $schedule ) {
$schedule_display_string = '';
if ( ! $schedule->get_date() ) {
return '0000-00-00 00:00:00';
}
$next_timestamp = $schedule->get_date()->getTimestamp();
$schedule_display_string .= $schedule->get_date()->format( static::DATE_FORMAT );
return $schedule_display_string;
}