display_name : __( 'Former team member', 'accessible-forms-by-accessible-org' ); } /** * Readable label for a recorded activity. * * @param string $action Stored action name. * @return string */ public static function activity_label( $action ) { $labels = array( 'entry_read' => __( 'Marked as read', 'accessible-forms-by-accessible-org' ), 'entry_updated' => __( 'Updated follow-up', 'accessible-forms-by-accessible-org' ), 'entry_workflow' => __( 'Saved follow-up', 'accessible-forms-by-accessible-org' ), 'entry_unread' => __( 'Marked as unread', 'accessible-forms-by-accessible-org' ), 'entry_spam' => __( 'Marked as spam', 'accessible-forms-by-accessible-org' ), 'entry_ham' => __( 'Accepted without sending email', 'accessible-forms-by-accessible-org' ), 'entry_accept_notify' => __( 'Accepted and notified recipients', 'accessible-forms-by-accessible-org' ), 'entry_resend' => __( 'Queued the notification again', 'accessible-forms-by-accessible-org' ), 'entry_trash' => __( 'Moved to Trash', 'accessible-forms-by-accessible-org' ), 'entry_restore' => __( 'Restored from Trash', 'accessible-forms-by-accessible-org' ), 'entry_reply' => __( 'Replied to the visitor', 'accessible-forms-by-accessible-org' ), 'entry_reply_test' => __( 'Sent a test reply', 'accessible-forms-by-accessible-org' ), 'entry_reply_failed' => __( 'Reply could not be sent', 'accessible-forms-by-accessible-org' ), 'entry_reply_unrecorded' => __( 'Reply sent but not saved in notes', 'accessible-forms-by-accessible-org' ), 'bulk_read' => __( 'Marked as read (bulk)', 'accessible-forms-by-accessible-org' ), 'bulk_unread' => __( 'Marked as unread (bulk)', 'accessible-forms-by-accessible-org' ), 'bulk_spam' => __( 'Marked as spam (bulk)', 'accessible-forms-by-accessible-org' ), 'bulk_ham' => __( 'Accepted without notifying (bulk)', 'accessible-forms-by-accessible-org' ), 'bulk_trash' => __( 'Moved to Trash (bulk)', 'accessible-forms-by-accessible-org' ), 'bulk_delete' => __( 'Deleted permanently (bulk)', 'accessible-forms-by-accessible-org' ), 'bulk_resend' => __( 'Asked to send the notification again (bulk)', 'accessible-forms-by-accessible-org' ), 'resend_original_recipients' => __( 'Notification queued again for the original recipients', 'accessible-forms-by-accessible-org' ), 'resend_current_recipients' => __( 'Notification queued again for the current recipients', 'accessible-forms-by-accessible-org' ), 'attachment_approved' => __( 'Approved an attachment', 'accessible-forms-by-accessible-org' ), 'attachment_downloaded' => __( 'Downloaded an attachment', 'accessible-forms-by-accessible-org' ), 'attachment_downloaded_for_review' => __( 'Downloaded an attachment for review', 'accessible-forms-by-accessible-org' ), 'form_exported' => __( 'Exported the form', 'accessible-forms-by-accessible-org' ), 'form_exported_recipients' => __( 'Exported the form with its recipients', 'accessible-forms-by-accessible-org' ), 'form_imported' => __( 'Imported the form as a draft', 'accessible-forms-by-accessible-org' ), 'form_import_updated' => __( 'Updated the form from an import', 'accessible-forms-by-accessible-org' ), 'entries_imported' => __( 'Imported entries from a file', 'accessible-forms-by-accessible-org' ), 'settings_exported' => __( 'Exported settings', 'accessible-forms-by-accessible-org' ), 'settings_imported' => __( 'Imported settings', 'accessible-forms-by-accessible-org' ), ); return $labels[ $action ] ?? ucfirst( str_replace( '_', ' ', (string) $action ) ); } /** * Readable label for a notification job or attempt status. * * @param string $status Stored status. * @return string */ /** * Where a notification went: its recipients, or the host of an add-on's destination. * * @param array $config Notification. * @return string */ private static function destination( array $config ) { if ( isset( $config['destination'] ) && is_string( $config['destination'] ) ) { return $config['destination']; } if ( 'email' !== Notifications::channel( $config ) ) { return (string) wp_parse_url( (string) ( $config['url'] ?? '' ), PHP_URL_HOST ); } return implode( ', ', (array) ( $config['recipients'] ?? array() ) ); } private static function status_label( $status ) { $labels = array( 'pending' => __( 'Waiting to send', 'accessible-forms-by-accessible-org' ), 'sending' => __( 'Sending', 'accessible-forms-by-accessible-org' ), 'accepted' => __( 'Accepted', 'accessible-forms-by-accessible-org' ), 'failed' => __( 'Failed', 'accessible-forms-by-accessible-org' ), 'uncertain' => __( 'Delivery uncertain', 'accessible-forms-by-accessible-org' ), 'cancelled' => __( 'Cancelled', 'accessible-forms-by-accessible-org' ), ); return $labels[ $status ] ?? (string) $status; } /** * One attempt in the notification history, with the reason explained. * * @param array $attempt Stored attempt. */ private static function attempt( array $attempt ) { echo '
' . esc_html( sprintf( /* translators: 1: mail transport, 2: handoff status. */ __( 'Mail route: %1$s: %2$s', 'accessible-forms-by-accessible-org' ), $route['transport'] ?? '', self::status_label( $route['status'] ?? '' ) ) ) . '
'; if ( ! empty( $route['reference'] ) ) { echo '' . esc_html( sprintf( /* translators: %s: SMTP provider queue reference. */ __( 'Provider reference: %s', 'accessible-forms-by-accessible-org' ), $route['reference'] ) ) . '
'; } if ( ! empty( $route['reason'] ) ) { $explained = Notifications::explain( $route['reason'] ); echo '' . esc_html( $explained['summary'] ) . ( 'uncertain' === ( $route['status'] ?? '' ) ? ' ' . esc_html( $explained['next'] ) : '' ) . '
'; } } } public static function start( $entry ) { echo '