get_label(); } /** * @inheritdoc */ public function display() { $options = new Options(); ?>
wp_nonce_field(); ?>

get_title(); ?>

is_const_defined( 'general', 'do_not_send' ) ? 'disabled' : ''; ?> get( 'general', 'do_not_send' ) ); ?> >

wp_mail() function to send emails.', 'wp-mail-smtp' ), array( 'code' => array(), ) ) ); ?>


is_const_defined( 'general', 'do_not_send' ) ) { printf( /* translators: %1$s - constant that was used; %2$s - file where it was used. */ esc_html__( 'The value of this field was set using a constant %1$s most likely inside %2$s of your WordPress installation.', 'wp-mail-smtp' ), 'WPMS_DO_NOT_SEND', 'wp-config.php' ); } else { printf( wp_kses( /* translators: %s - The URL to the constants support article. */ __( 'Please read this support article if you want to enable this option using constants.', 'wp-mail-smtp' ), [ 'a' => [ 'href' => [], 'target' => [], 'rel' => [], ], ] ), 'https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/' ); } ?>

get( 'general', 'am_notifications_hidden' ) ); ?> id="wp-mail-smtp-setting-am_notifications_hidden" >
get_admin()->is_error_delivery_notice_enabled(); ?> get( 'general', 'email_delivery_errors_hidden' ) ); ?> id="wp-mail-smtp-setting-email_delivery_errors_hidden">

wp_mail_smtp_admin_is_error_delivery_notice_enabled' ); ?>

This is not recommended and should only be done for staging or development sites.', 'wp-mail-smtp' ), array( 'strong' => true, ) ); ?>

get( 'general', 'uninstall' ) ); ?> id="wp-mail-smtp-setting-uninstall">
get( 'general', UsageTracking::SETTINGS_SLUG ) ); ?> id="wp-mail-smtp-setting-usage-tracking">
display_save_btn(); ?>
check_admin_referer(); $options = new Options(); // Unchecked checkboxes doesn't exist in $_POST, so we need to ensure we actually have them in data to save. if ( empty( $data['general']['do_not_send'] ) ) { $data['general']['do_not_send'] = false; } if ( empty( $data['general']['am_notifications_hidden'] ) ) { $data['general']['am_notifications_hidden'] = false; } if ( empty( $data['general']['email_delivery_errors_hidden'] ) ) { $data['general']['email_delivery_errors_hidden'] = false; } if ( empty( $data['general']['uninstall'] ) ) { $data['general']['uninstall'] = false; } if ( empty( $data['general'][ UsageTracking::SETTINGS_SLUG ] ) ) { $data['general'][ UsageTracking::SETTINGS_SLUG ] = false; } $to_save = Options::array_merge_recursive( $options->get_all(), $data ); // All the sanitization is done there. $options->set( $to_save ); WP::add_admin_notice( esc_html__( 'Settings were successfully saved.', 'wp-mail-smtp' ), WP::ADMIN_NOTICE_SUCCESS ); } }