get_label(); } /** * Output HTML of the misc settings. * * @since 1.0.0 */ public function display() { $options = Options::init(); ?>
wp_nonce_field(); ?>

get_title(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>

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

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


is_const_defined( 'general', 'do_not_send' ) ) { echo $options->get_const_set_message( 'WPMS_DO_NOT_SEND' ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } 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' => [], ], ] ), // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound esc_url( wp_mail_smtp()->get_utm_url( 'https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/', [ 'medium' => 'misc-settings', 'content' => 'Do not send setting description - support article' ] ) ) ); } ?>

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' ), [ 'strong' => [], ] ); ?>

get( 'general', 'dashboard_widget_hidden' ) ); ?> id="wp-mail-smtp-setting-dashboard_widget_hidden" >
get( 'general', 'uninstall' ) ); ?> id="wp-mail-smtp-setting-uninstall">
get( 'general', UsageTracking::SETTINGS_SLUG ) ); ?> id="wp-mail-smtp-setting-usage-tracking">
is_const_defined( 'general', SummaryReportEmail::SETTINGS_SLUG ) || ( wp_mail_smtp()->is_pro() && empty( Options::init()->get( 'logs', 'enabled' ) ) ) ); ?>>

is_pro() && empty( Options::init()->get( 'logs', 'enabled' ) ) ) { echo wp_kses( sprintf( /* translators: %s - Email Log settings url. */ __( 'Please enable Email Logging first, before this setting can be configured.', 'wp-mail-smtp' ), esc_url( wp_mail_smtp()->get_admin()->get_admin_page_url( Area::SLUG . '&tab=logs' ) ) ), [ 'a' => [ 'href' => [], ], ] ); } else { printf( '%2$s', esc_url( SummaryReportEmail::get_preview_link() ), esc_html__( 'View Email Summary Example', 'wp-mail-smtp' ) ); } if ( $options->is_const_defined( 'general', SummaryReportEmail::SETTINGS_SLUG ) ) { echo '
' . $options->get_const_set_message( 'WPMS_SUMMARY_REPORT_EMAIL_DISABLED' ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } ?>

display_save_btn(); ?>
check_admin_referer(); $options = Options::init(); // 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']['dashboard_widget_hidden'] ) ) { $data['general']['dashboard_widget_hidden'] = false; } if ( empty( $data['general']['uninstall'] ) ) { $data['general']['uninstall'] = false; } if ( empty( $data['general'][ UsageTracking::SETTINGS_SLUG ] ) ) { $data['general'][ UsageTracking::SETTINGS_SLUG ] = false; } if ( empty( $data['general'][ SummaryReportEmail::SETTINGS_SLUG ] ) ) { $data['general'][ SummaryReportEmail::SETTINGS_SLUG ] = false; } $is_summary_report_email_opt_changed = $options->is_option_changed( $options->parse_boolean( $data['general'][ SummaryReportEmail::SETTINGS_SLUG ] ), 'general', SummaryReportEmail::SETTINGS_SLUG ); // If this option was changed, cancel summary report email task. if ( $is_summary_report_email_opt_changed ) { ( new SummaryReportEmailTask() )->cancel(); } // All the sanitization is done there. $options->set( $data, false, false ); WP::add_admin_notice( esc_html__( 'Settings were successfully saved.', 'wp-mail-smtp' ), WP::ADMIN_NOTICE_SUCCESS ); } }