/** * Creates the HTML for the Deadline Field * @param string $deadline Existing field data */ protected function create_deadline_field($deadline = NULL) { if (CTDL_Loader::$settings['show_deadline'] == 1) { $value = isset($deadline) && $deadline != 0 ? date('Y-m-d', $deadline) : ''; $this->form .= sprintf('<tr> <th scope="row"><label for="cleverness_todo_deadline">%s</label></th> <td><input type="hidden" name="cleverness_todo_format" id="cleverness_todo_format" value="%s" /> <input type="text" name="cleverness_todo_deadline" id="cleverness_todo_deadline" value="%s" /></td> </tr>', apply_filters('ctdl_deadline', esc_html__('Deadline', 'cleverness-to-do-list')), CTDL_Lib::dateFormatTojQueryUIDatePickerFormat('Y-m-d'), esc_attr($value)); } }