%s — %s: %s', esc_url( $editUrl ), esc_html( $title ), esc_html__( 'missing', 'double-opt-in' ), esc_html( implode( ', ', $missingLabels ) ) ); } if ( empty( $items ) ) { return; } $dismissUrl = wp_nonce_url( add_query_arg( self::DISMISS_QUERY_ARG, '1' ), self::DISMISS_NONCE ); printf( '

%s

%s

%s

', esc_html__( 'Double Opt-In: forms auto-disabled due to incomplete configuration', 'double-opt-in' ), esc_html__( 'The following forms had their Double Opt-In disabled during the upgrade because required fields were missing. Open each form to complete its configuration and re-enable it.', 'double-opt-in' ), implode( '', $items ), // each item is already escaped above esc_url( $dismissUrl ), esc_html__( 'Dismiss this notice', 'double-opt-in' ) ); } /** * Map a stable missing-field ID to a translatable user-facing label. * * Mirrors the message map in FormSettingsValidator::messageForMissingField() * but at the field-name level (the notice already says "missing" * surrounding it). */ private function labelForMissingField( string $field ): string { $labels = apply_filters( 'f12_doi_form_missing_field_labels', array( 'recipient' => __( 'Recipient field', 'double-opt-in' ), 'subject' => __( 'Subject', 'double-opt-in' ), 'body_or_template' => __( 'Email body or template', 'double-opt-in' ), ) ); return $labels[ $field ] ?? $field; } }