updated plugin WP Mail SMTP
version 2.2.1
This commit is contained in:
@ -198,7 +198,12 @@ class MiscTab extends PageAbstract {
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* Process tab form submission ($_POST).
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @since 2.2.0 Fixed checkbox saving and use the correct merge to prevent breaking other 'general' checkboxes.
|
||||
*
|
||||
* @param array $data Tab data specific for the plugin ($_POST).
|
||||
*/
|
||||
public function process_post( $data ) {
|
||||
|
||||
@ -207,14 +212,20 @@ class MiscTab extends PageAbstract {
|
||||
$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;
|
||||
}
|
||||
|
||||
$to_save = array_merge( $options->get_all(), $data );
|
||||
$to_save = Options::array_merge_recursive( $options->get_all(), $data );
|
||||
|
||||
// All the sanitization is done there.
|
||||
$options->set( $to_save );
|
||||
|
Reference in New Issue
Block a user