Changeset 2344280
- Timestamp:
- 07/21/2020 06:35:53 PM (6 years ago)
- File:
-
- 1 edited
-
smart-wetransfer/trunk/smart-wetransfer.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smart-wetransfer/trunk/smart-wetransfer.php
r2165918 r2344280 3 3 Plugin Name: Smart WeTransfer 4 4 Plugin URI: https://grittechnologies.com/plugins 5 Version: 1. 25 Version: 1.3 6 6 Author: Mrityunjay Kumar 7 7 Author URI: https://profiles.wordpress.org/mrityunjay/ … … 23 23 24 24 function wetransfer_getForm(){ 25 ob_start(); 26 if(isset($_SESSION['grit_msg'])){ 27 echo "<h3 style='color:green'>".$_SESSION['grit_msg']."</h3>"; 28 } 29 unset($_SESSION['grit_msg']); 25 30 ?> 26 31 … … 86 91 <p><br/><input type='submit' class='btn btn-primary' name='submit_file' value='<?php _e('Submit', 'wetransfer');?>'></p> 87 92 </form><?php 93 94 return ob_get_clean(); 88 95 } 89 96 … … 130 137 $save_failed = __('<span class="error">Data did not save.</span>', 'wetransfer'); 131 138 $dataArray['save_failed'] = $save_failed; 139 }else{ 140 141 add_action('init','smart_wetransfer_send_notification'); 142 function smart_wetransfer_send_notification(){ 143 //php mailer variables 144 $to = get_option('admin_email'); 145 $subject = "New file submitted to wetransfer account"; 146 $message = "A new file submitted to your wetransfer account by ".$_POST['your_email'].". Link to the file is ".$_POST['wt_embed_output']; 147 $headers = 'From: '. $_POST['your_email'] . "\r\n" . 148 'Reply-To: ' . $_POST['your_email'] . "\r\n"; 149 150 151 //Here put your Validation and send mail 152 $sent = wp_mail($to, $subject, strip_tags($message), $headers); 153 154 $_SESSION['grit_msg'] = 'Success'; 155 156 } 157 158 132 159 } 133 160 }
Note: See TracChangeset
for help on using the changeset viewer.