user_email ); } include MASHSB_PLUGIN_DIR . 'includes/admin/views/deactivate-feedback.php'; } /** * send feedback via email * * @since 1.4.0 */ function mashsb_send_feedback() { if( isset( $_POST['data'] ) ) { parse_str( $_POST['data'], $form ); } $text = ''; if( isset( $form['mashsb_disable_text'] ) ) { $text = implode( "\n\r", $form['mashsb_disable_text'] ); } $headers = array(); $from = isset( $form['mashsb_disable_from'] ) ? $form['mashsb_disable_from'] : ''; if( $from ) { $headers[] = "From: $from"; $headers[] = "Reply-To: $from"; } $subject = isset( $form['mashsb_disable_reason'] ) ? $form['mashsb_disable_reason'] : '(no reason given)'; $success = wp_mail( 'makebetter@mashshare.net', $subject, $text, $headers ); if ($success){ wp_die(1); } wp_die(0); //error_log(print_r($success, true)); //error_log($from . $subject . var_dump($form)); die(); } add_action( 'wp_ajax_mashsb_send_feedback', 'mashsb_send_feedback' );