';
return;
}
$table = new StackMime_Forms_List_Table();
$table->prepare_items();
stackmime_forms_ui_open( false );
if ( isset( $_GET['done'] ) ) {
stackmime_forms_ui_alert( 'ok', sanitize_text_field( wp_unslash( $_GET['done'] ) ) );
}
if ( ! defined( 'STACKMIME_MAIL_VERSION' ) && ! get_option( 'stackmime_forms_mail_hint_off' ) && current_user_can( 'manage_options' ) ) {
stackmime_forms_ui_alert( 'info', __( 'Tip: entries are always saved here, but email alerts sent with your server\'s default mail often land in spam. An SMTP plugin such as StackMime Mail fixes that.', 'stackmime-forms' ) );
}
?>
views(); ?>
';
}
/**
* Address of one entry. The link carries a nonce tied to the entry, so opening it from the entries list
* marks it as read; without a valid nonce (for example a link in an email alert) the entry opens read-only.
*
* @param int $id Entry ID.
*/
function stackmime_forms_entry_url( $id ) {
return wp_nonce_url( admin_url( 'admin.php?page=stackmime-forms&entry=' . (int) $id ), 'stackmime_forms_read_' . (int) $id, '_smfnonce' );
}
/**
* Single entry screen. Opening an entry from the entries list (a nonce-protected link) marks it as read.
*
* @param int $id Entry ID.
*/
function stackmime_forms_render_entry( $id ) {
$entry = stackmime_forms_entry( $id );
if ( ! $entry ) {
echo '