settings_errors example

$requests_table->process_bulk_action();
$requests_table->prepare_items();

require_once ABSPATH . 'wp-admin/admin-header.php';
?> <div class="wrap nosubsub"> <h1><?php esc_html_e( 'Erase Personal Data' ); ?></h1> <p><?php _e( 'This tool helps site owners comply with local laws and regulations by deleting or anonymizing known data for a given user.' ); ?></p> <hr class="wp-header-end" /> <?php settings_errors(); ?> <form action="<?php echo esc_url( admin_url( 'erase-personal-data.php' ) ); ?>" method="post" class="wp-privacy-request-form"> <h2><?php esc_html_e( 'Add Data Erasure Request' ); ?></h2> <div class="wp-privacy-request-form-field"> <table class="form-table"> <tr> <th scope="row"> <label for="username_or_email_for_privacy_request"><?php esc_html_e( 'Username or email address' ); ?></label> </th> <td> <input type="text" required class="regular-text ltr" id="username_or_email_for_privacy_request" name="username_or_email_for_privacy_request" /> </td> </tr> <tr> <th scope="row">
$requests_table->process_bulk_action();
$requests_table->prepare_items();

require_once ABSPATH . 'wp-admin/admin-header.php';
?> <div class="wrap nosubsub"> <h1><?php esc_html_e( 'Export Personal Data' ); ?></h1> <p><?php _e( 'This tool helps site owners comply with local laws and regulations by exporting known data for a given user in a .zip file.' ); ?></p> <hr class="wp-header-end" /> <?php settings_errors(); ?> <form action="<?php echo esc_url( admin_url( 'export-personal-data.php' ) ); ?>" method="post" class="wp-privacy-request-form"> <h2><?php esc_html_e( 'Add Data Export Request' ); ?></h2> <div class="wp-privacy-request-form-field"> <table class="form-table"> <tr> <th scope="row"> <label for="username_or_email_for_privacy_request"><?php esc_html_e( 'Username or email address' ); ?></label> </th> <td> <input type="text" required class="regular-text ltr" id="username_or_email_for_privacy_request" name="username_or_email_for_privacy_request" /> </td> </tr> <tr> <th scope="row">


wp_reset_vars( array( 'action' ) );

if ( isset( $_GET['updated'] ) && isset( $_GET['page'] ) ) {
    // For back-compat with plugins that don't use the Settings API and just set updated=1 in the redirect.     add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'success' );
}

settings_errors();
Home | Imprint | This part of the site doesn't use cookies.