Form_Edit_Page_Handler::maybe_show_duplicate_form_feedback()

Displays feedback from the duplicate form action when applicable.

Description

Source

File: src/db-objects/forms/form-edit-page-handler.php

	public function maybe_show_duplicate_form_feedback() {
		$meta_key = $this->form_manager->get_prefix() . 'duplicate_feedback';

		if ( empty( $_GET[ $meta_key ] ) ) {
			return;
		}

		$form_id = (int) $_GET[ $meta_key ];
		unset( $_GET[ $meta_key ] );

		$feedback = $this->form_manager->get_meta( $form_id, $meta_key, true );
		if ( ! is_array( $feedback ) ) {
			return;
		}

		$this->form_manager->delete_meta( $form_id, $meta_key );

		?>
		<div class="notice notice-<?php echo esc_attr( $feedback['type'] ); ?>">
			<p><?php echo wp_kses( $feedback['message'], array( 'strong' => array(), 'a' => array( 'href' => array() ) ) ); ?></p>
		</div>
		<?php
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.