';
+ printf( '
%s
', esc_html__( 'Import forms', 'allterrain-forms' ) );
+
+ // The outcome of the redirect that brought us here. Display only — the
+ // import itself was authorised by the nonce checked in the handler.
+ // phpcs:disable WordPress.Security.NonceVerification.Recommended
+ $imported = isset( $_GET['atf_imported'] ) ? absint( $_GET['atf_imported'] ) : 0;
+ $failed = isset( $_GET['atf_failed'] ) ? absint( $_GET['atf_failed'] ) : 0;
+ // phpcs:enable WordPress.Security.NonceVerification.Recommended
+
+ if ( $imported || $failed ) {
+ printf(
+ '
',
+ $failed ? 'warning' : 'success',
+ esc_html(
+ sprintf(
+ /* translators: %d: number of forms imported. */
+ _n( '%d form imported.', '%d forms imported.', $imported, 'allterrain-forms' ),
+ $imported
+ )
+ ),
+ esc_html(
+ $failed ? ' ' . sprintf(
+ /* translators: %d: number of forms that could not be imported. */
+ _n( '%d could not be imported.', '%d could not be imported.', $failed, 'allterrain-forms' ),
+ $failed
+ ) : ''
+ )
+ );
+ }
+
+ if ( ! $available ) {
+ printf(
+ '
%s
',
+ esc_html__( 'No importable forms were found. Importers look for data from Contact Form 7, WPForms and Gravity Forms — the data is read even when the source plugin has been deactivated.', 'allterrain-forms' )
+ );
+
+ return;
+ }
+
+ printf(
+ '