Changeset 2591285
- Timestamp:
- 08/31/2021 07:54:46 AM (4 years ago)
- Location:
- wp-reroute-email/trunk
- Files:
-
- 6 edited
-
db_log.php (modified) (2 diffs)
-
includes/db_log_list.class.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
settings.php (modified) (6 diffs)
-
test.php (modified) (1 diff)
-
wp-reroute-email.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-reroute-email/trunk/db_log.php
r2226063 r2591285 16 16 <table class="message-table"> 17 17 <tr> 18 <th><?php _e('Sent On', 'wp_reroute_email'); ?>:</th>19 <td><?php e cho get_date_from_gmt( $item->sent_on, 'j F, Y H:i:s'); ?></td>18 <th><?php esc_html_e('Sent On', 'wp_reroute_email'); ?>:</th> 19 <td><?php esc_html_e(get_date_from_gmt( $item->sent_on, 'j F, Y H:i:s' )); ?></td> 20 20 </tr> 21 21 <tr> 22 <th><?php _e('To', 'wp_reroute_email'); ?>:</th>23 <td><?php e cho $item->recipients_to; ?></td>22 <th><?php esc_html_e('To', 'wp_reroute_email'); ?>:</th> 23 <td><?php esc_html_e($item->recipients_to); ?></td> 24 24 </tr> 25 25 <tr> 26 <th><?php _e('CC', 'wp_reroute_email'); ?>:</th>27 <td><?php e cho $item->recipients_cc; ?></td>26 <th><?php esc_html_e('CC', 'wp_reroute_email'); ?>:</th> 27 <td><?php esc_html_e($item->recipients_cc); ?></td> 28 28 </tr> 29 29 <tr> 30 <th><?php _e('BCC', 'wp_reroute_email'); ?>:</th>31 <td><?php e cho $item->recipients_bcc; ?></td>30 <th><?php esc_html_e('BCC', 'wp_reroute_email'); ?>:</th> 31 <td><?php esc_html_e($item->recipients_bcc); ?></td> 32 32 </tr> 33 33 <tr> 34 <th><?php _e('Subject', 'wp_reroute_email'); ?>:</th>35 <td><?php e cho $item->subject; ?></td>34 <th><?php esc_html_e('Subject', 'wp_reroute_email'); ?>:</th> 35 <td><?php esc_html_e($item->subject); ?></td> 36 36 </tr> 37 37 <tr> 38 38 <td> </td> 39 <td><a href="javascript:;" id="view-original" class="orgview"><?php _e('View Original Message', 'wp_reroute_email');?></a></td>39 <td><a href="javascript:;" id="view-original" class="orgview"><?php esc_html_e('View Original Message', 'wp_reroute_email');?></a></td> 40 40 </tr> 41 41 <tr> … … 44 44 <?php 45 45 $is_only_html = preg_match("/<[^<]+>/", $item->message, $m) != 0; 46 echo $is_only_html ? $item->message: nl2br($item->message);46 echo $is_only_html ? wp_kses_post($item->message) : nl2br($item->message); 47 47 ?> 48 48 </div> -
wp-reroute-email/trunk/includes/db_log_list.class.php
r2226063 r2591285 24 24 function column_subject($item){ 25 25 $actions = array( 26 'view' => sprintf('<a href="?page=%s&tab=details&action=%s&logid=%s">' . __('View Message', 'wp_reroute_email') . '</a>',$_REQUEST['page'],'view',$item->id)26 'view' => sprintf('<a href="?page=%s&tab=details&action=%s&logid=%s">' . esc_attr__('View Message', 'wp_reroute_email') . '</a>',$_REQUEST['page'],'view',$item->id) 27 27 ); 28 28 … … 34 34 35 35 function column_sent_on($item){ 36 return get_date_from_gmt( $item->sent_on, 'j F, Y H:i:s');36 return get_date_from_gmt($item->sent_on, 'j F, Y H:i:s'); 37 37 } 38 38 … … 40 40 $columns = array( 41 41 'id' => 'ID', 42 'subject' => __('Subject', 'wp_reroute_email'),43 'recipients_to' => __('Sent To', 'wp_reroute_email'),44 'sent_on' => __('Sent On', 'wp_reroute_email')42 'subject' => esc_attr__('Subject', 'wp_reroute_email'), 43 'recipients_to' => esc_attr__('Sent To', 'wp_reroute_email'), 44 'sent_on' => esc_attr__('Sent On', 'wp_reroute_email') 45 45 ); 46 46 … … 58 58 function get_bulk_actions() { 59 59 $actions = array( 60 'delete_all_messages' => __('Delete All Messages', 'wp_reroute_email')60 'delete_all_messages' => esc_attr__('Delete All Messages', 'wp_reroute_email') 61 61 ); 62 62 -
wp-reroute-email/trunk/readme.txt
r2476281 r2591285 3 3 Tags: mail, email, developer tool, development server 4 4 Tested up to: 5.6.1 5 Stable tag: 1.4. 55 Stable tag: 1.4.6 6 6 License: GPLv2 or later 7 7 … … 33 33 34 34 == Changelog == 35 = 1.4.6 = 36 * Security fixes. 37 * Compatibility check. 38 35 39 = 1.4.5 = 36 40 * Added options to disable rerouting based on email subjects. -
wp-reroute-email/trunk/settings.php
r2476281 r2591285 18 18 19 19 if($enable && !$email){ 20 print '<div id="message" class="error fade"><p>'. __('Enter at least one email address.', 'wp_reroute_email') . '</p></div>';20 print '<div id="message" class="error fade"><p>'. esc_html__('Enter at least one email address.', 'wp_reroute_email') . '</p></div>'; 21 21 $error = true; 22 22 } … … 30 30 update_option('wp_reroute_email_db_log_option', $db_log_option); 31 31 update_option('wp_reroute_email_ignored_subjects', $ignored_subjects); 32 print '<div id="message" class="updated fade"><p>'. __('Settings saved.', 'wp_reroute_email') . '</p></div>';32 print '<div id="message" class="updated fade"><p>'. esc_html__('Settings saved.', 'wp_reroute_email') . '</p></div>'; 33 33 } 34 34 } … … 47 47 <h2>WP Reroute Email</h2> 48 48 <h2 class="nav-tab-wrapper"> 49 <a href="?page=wp-reroute-email%2Fsettings.php" class="nav-tab <?php e cho empty($tab) ? 'nav-tab-active' : ''; ?>"><?php_e('Settings', 'wp_reroute_email'); ?></a>50 <a href="?page=wp-reroute-email%2Fsettings.php&tab=log" class="nav-tab <?php e cho $tab == 'log' ? 'nav-tab-active' : ''; ?>"><?php_e('Logs', 'wp_reroute_email'); ?></a>51 <a href="?page=wp-reroute-email%2Fsettings.php&tab=test" class="nav-tab <?php e cho $tab == 'test' ? 'nav-tab-active' : ''; ?>"><?php_e('Test', 'wp_reroute_email'); ?></a>49 <a href="?page=wp-reroute-email%2Fsettings.php" class="nav-tab <?php esc_attr_e(empty($tab) ? 'nav-tab-active' : ''); ?>"><?php esc_html_e('Settings', 'wp_reroute_email'); ?></a> 50 <a href="?page=wp-reroute-email%2Fsettings.php&tab=log" class="nav-tab <?php esc_attr_e($tab == 'log' ? 'nav-tab-active' : ''); ?>"><?php esc_html_e('Logs', 'wp_reroute_email'); ?></a> 51 <a href="?page=wp-reroute-email%2Fsettings.php&tab=test" class="nav-tab <?php esc_attr_e($tab == 'test' ? 'nav-tab-active' : ''); ?>"><?php esc_html_e('Test', 'wp_reroute_email'); ?></a> 52 52 <?php if($tab == 'details'): ?> 53 <a href="javascript:;" class="nav-tab <?php e cho $tab == 'details' ? 'nav-tab-active' : ''; ?>"><?php_e('Message Details', 'wp_reroute_email'); ?></a>53 <a href="javascript:;" class="nav-tab <?php esc_attr_e($tab == 'details' ? 'nav-tab-active' : ''); ?>"><?php esc_html_e('Message Details', 'wp_reroute_email'); ?></a> 54 54 <?php endif; ?> 55 55 </h2> … … 60 60 <tbody> 61 61 <tr> 62 <th scope="row"><?php _e('Enable rerouting', 'wp_reroute_email'); ?></th>62 <th scope="row"><?php esc_html_e('Enable rerouting', 'wp_reroute_email'); ?></th> 63 63 <td> 64 <input type="checkbox" <?php print $enable ? 'checked="checked"' : ''; ?> value="1" name="enable_reroute" id="enable_reroute">64 <input type="checkbox" <?php esc_attr_e($enable ? 'checked="checked"' : ''); ?> value="1" name="enable_reroute" id="enable_reroute"> 65 65 </td> 66 66 </tr> … … 71 71 <tbody> 72 72 <tr> 73 <th scope="row"><?php _e('Email address', 'wp_reroute_email'); ?></th>73 <th scope="row"><?php esc_html_e('Email address', 'wp_reroute_email'); ?></th> 74 74 <td> 75 <input type="text" name="email_address" size="60" value="<?php print $email; ?>">76 <br><span class="description"><?php _e('Provide a comma-delimited list of email addresses to pass through.', 'wp_reroute_email'); ?></span>75 <input type="text" name="email_address" size="60" value="<?php esc_attr_e($email); ?>"> 76 <br><span class="description"><?php esc_html_e('Provide a comma-delimited list of email addresses to pass through.', 'wp_reroute_email'); ?></span> 77 77 </td> 78 78 </tr> 79 79 <tr> 80 <th scope="row"><?php _e('Append text', 'wp_reroute_email'); ?></th>80 <th scope="row"><?php esc_html_e('Append text', 'wp_reroute_email'); ?></th> 81 81 <td> 82 <input type="text" name="append_msg" size="60" value="<?php print $append_msg; ?>">83 <br><span class="description"><?php _e('This text will be appended with the mail body. Leave it blank if you do not want to append anything.', 'wp_reroute_email'); ?></span>82 <input type="text" name="append_msg" size="60" value="<?php esc_attr_e($append_msg); ?>"> 83 <br><span class="description"><?php esc_html_e('This text will be appended with the mail body. Leave it blank if you do not want to append anything.', 'wp_reroute_email'); ?></span> 84 84 </td> 85 85 </tr> 86 86 <tr> 87 <th scope="row"><?php _e('Append recipient email addresses', 'wp_reroute_email'); ?></th>87 <th scope="row"><?php esc_html_e('Append recipient email addresses', 'wp_reroute_email'); ?></th> 88 88 <td> 89 <input type="checkbox" <?php print $append_recipient ? 'checked="checked"' : ''; ?> value="1" name="append_recipient" id="append_recipient">90 <br><span class="description"><?php _e('Enable this if you want to append recipient email addresses at the bottom of the email.', 'wp_reroute_email'); ?></span>89 <input type="checkbox" <?php esc_attr_e($append_recipient ? 'checked="checked"' : ''); ?> value="1" name="append_recipient" id="append_recipient"> 90 <br><span class="description"><?php esc_html_e('Enable this if you want to append recipient email addresses at the bottom of the email.', 'wp_reroute_email'); ?></span> 91 91 </td> 92 92 </tr> 93 93 <tr> 94 <th scope="row"><?php _e('Log emails in DB', 'wp_reroute_email'); ?></th>94 <th scope="row"><?php esc_html_e('Log emails in DB', 'wp_reroute_email'); ?></th> 95 95 <td> 96 <input type="checkbox" <?php print $enable_db_log ? 'checked="checked"' : ''; ?> name="enable_db_log" id="enable_db_log" value="1">97 <br><span class="description"><?php _e('Enable this if you want to store a copy of the email in database. You may also skip email sending and store email only to database.', 'wp_reroute_email'); ?></span>96 <input type="checkbox" <?php esc_attr_e($enable_db_log ? 'checked="checked"' : ''); ?> name="enable_db_log" id="enable_db_log" value="1"> 97 <br><span class="description"><?php esc_html_e('Enable this if you want to store a copy of the email in database. You may also skip email sending and store email only to database.', 'wp_reroute_email'); ?></span> 98 98 <div class="log-email-options"> 99 <strong><?php _e('Select an option', 'wp_reroute_email'); ?></strong><br>100 <input type="radio" <?php print $db_log_option == 1 ? 'checked="checked"' : ''; ?> name="enable_db_log_option" id="enable_db_log_option_1" value="1"> <label for="enable_db_log_option_1"><?php_e('Store a copy of email in database and send email', 'wp_reroute_email'); ?></label><br>101 <input type="radio" <?php print $db_log_option == 2 ? 'checked="checked"' : ''; ?> name="enable_db_log_option" id="enable_db_log_option_2" value="2"> <label for="enable_db_log_option_2"><?php_e('Store a copy of email in database and do not send email', 'wp_reroute_email'); ?></label>99 <strong><?php esc_html_e('Select an option', 'wp_reroute_email'); ?></strong><br> 100 <input type="radio" <?php esc_attr_e($db_log_option == 1 ? 'checked="checked"' : ''); ?> name="enable_db_log_option" id="enable_db_log_option_1" value="1"> <label for="enable_db_log_option_1"><?php esc_html_e('Store a copy of email in database and send email', 'wp_reroute_email'); ?></label><br> 101 <input type="radio" <?php esc_attr_e($db_log_option == 2 ? 'checked="checked"' : ''); ?> name="enable_db_log_option" id="enable_db_log_option_2" value="2"> <label for="enable_db_log_option_2"><?php esc_html_e('Store a copy of email in database and do not send email', 'wp_reroute_email'); ?></label> 102 102 </div> 103 103 </td> 104 104 </tr> 105 105 <tr> 106 <th scope="row"><?php _e('Ignore emails containing these texts in subjects', 'wp_reroute_email'); ?></th>106 <th scope="row"><?php esc_html_e('Ignore emails containing these texts in subjects', 'wp_reroute_email'); ?></th> 107 107 <td> 108 <textarea name="ignored_subjects" id="ignored_subjects" rows="8" cols="100"><?php e cho $ignored_subjects; ?></textarea>109 <br><span class="description"><?php _e('Provide a comma, semicolon, or newline-delimited list of message subjects or part of the subjects to be ignored when rerouting.', 'wp_reroute_email'); ?></span>108 <textarea name="ignored_subjects" id="ignored_subjects" rows="8" cols="100"><?php esc_attr_e($ignored_subjects); ?></textarea> 109 <br><span class="description"><?php esc_html_e('Provide a comma, semicolon, or newline-delimited list of message subjects or part of the subjects to be ignored when rerouting.', 'wp_reroute_email'); ?></span> 110 110 </td> 111 111 </tr> … … 113 113 </table> 114 114 </div> 115 <p class="submit"><input type="submit" value="<?php _e('Save Changes', 'wp_reroute_email'); ?>"></p>115 <p class="submit"><input type="submit" value="<?php esc_html_e('Save Changes', 'wp_reroute_email'); ?>" class="button blue"></p> 116 116 </form> 117 117 <?php elseif($tab == 'log' || $tab == 'details'): ?> -
wp-reroute-email/trunk/test.php
r2226063 r2591285 5 5 6 6 if($_SERVER['REQUEST_METHOD'] == 'POST' && $tab == 'test'){ 7 $to = filter_input(INPUT_POST, 'to_email');8 $subject = filter_input(INPUT_POST, 'subject');9 $message = filter_input(INPUT_POST, 'message');7 $to = sanitize_text_field(filter_input(INPUT_POST, 'to_email')); 8 $subject = sanitize_text_field(filter_input(INPUT_POST, 'subject')); 9 $message = sanitize_textarea_field(filter_input(INPUT_POST, 'message')); 10 10 11 11 if($to && $subject && $message){ 12 12 wp_mail($to, $subject, $message); 13 print '<div id="message" class="updated fade"><p>'. __('Email sent.', 'wp_reroute_email') . '</p></div>';13 print '<div id="message" class="updated fade"><p>'. esc_html__('Email sent.', 'wp_reroute_email') . '</p></div>'; 14 14 } 15 15 } 16 16 ?> 17 <p><?php _e('You may test your settings by sending an email using this form.', 'wp_reroute_email');?></p>17 <p><?php esc_html_e('You may test your settings by sending an email using this form.', 'wp_reroute_email');?></p> 18 18 <form action="" method="POST"> 19 19 <table class="form-table"> 20 20 <tbody> 21 21 <tr> 22 <th scope="row"><?php _e('To', 'wp_reroute_email'); ?></th>22 <th scope="row"><?php esc_html_e('To', 'wp_reroute_email'); ?></th> 23 23 <td><input type="email" name="to_email" size="60" value="[email protected]"></td> 24 24 </tr> 25 25 <tr> 26 <th scope="row"><?php _e('Subject', 'wp_reroute_email'); ?></th>26 <th scope="row"><?php esc_html_e('Subject', 'wp_reroute_email'); ?></th> 27 27 <td><input type="text" name="subject" size="60" value="WP Reroute Email Test Message"></td> 28 28 </tr> 29 29 <tr> 30 <th scope="row"><?php _e('Message', 'wp_reroute_email'); ?></th>30 <th scope="row"><?php esc_html_e('Message', 'wp_reroute_email'); ?></th> 31 31 <td><textarea name="message" rows="5" cols="70">This is a test message from WP Reroute Email.</textarea></td> 32 32 </tr> 33 33 <tr> 34 <td colspan="2"><input type="submit" value=" <?php _e('Send', 'wp_reroute_email'); ?>"></td>34 <td colspan="2"><input type="submit" value=" <?php esc_attr_e('Send', 'wp_reroute_email'); ?> " class="button blue"></td> 35 35 </tr> 36 36 </tbody> -
wp-reroute-email/trunk/wp-reroute-email.php
r2476281 r2591285 4 4 * Plugin URI: http://wordpress.org/extend/plugins/wp-reroute-email/ 5 5 * Description: This plugin intercepts all outgoing emails from a WordPress site and reroutes them to a predefined configurable email address. 6 * Version: 1.4. 56 * Version: 1.4.6 7 7 * Author: Sajjad Hossain 8 8 * Author URI: http://www.sajjadhossain.com … … 188 188 189 189 if ($file == $this->plugin_name) { 190 $settings_link = '<a href="admin.php?page=wp-reroute-email/settings.php">' . __('Settings', 'wp_reroute_email') . '</a>';190 $settings_link = '<a href="admin.php?page=wp-reroute-email/settings.php">' . esc_html__('Settings', 'wp_reroute_email') . '</a>'; 191 191 array_unshift($links, $settings_link); 192 192 } … … 278 278 279 279 private function ignore_send($subject){ 280 281 282 280 return false; 283 281 } … … 290 288 291 289 if($db_log_option == 1){ 292 $extra = __('All emails will be stored in database after sending.', 'wp_reroute_email');290 $extra = esc_html__('All emails will be stored in database after sending.', 'wp_reroute_email'); 293 291 } 294 292 else{ 295 $extra = __('Emails will only be stored in database and no email will be sent.', 'wp_reroute_email');293 $extra = esc_html__('Emails will only be stored in database and no email will be sent.', 'wp_reroute_email'); 296 294 } 297 295 } 298 296 else if(get_option('wp_reroute_email_address')){ 299 $extra = sprintf( __('All emails from the site will be sent to <strong>%1$s</strong>', 'wp_reroute_email'), get_option('wp_reroute_email_address'));297 $extra = sprintf(esc_html__('All emails from the site will be sent to <strong>%1$s</strong>', 'wp_reroute_email'), get_option('wp_reroute_email_address')); 300 298 } 301 299 302 300 $admin_url = admin_url(); 303 301 echo '<div class="error"> <p>' 304 . sprintf( __('This site has %1$sWP Reroute Email%2$s enabled.', 'wp_reroute_email'), '<strong>', '</strong>')302 . sprintf(esc_html__('This site has %1$sWP Reroute Email%2$s enabled.', 'wp_reroute_email'), '<strong>', '</strong>') 305 303 . ($extra ? ' ' . $extra . ' ' : '') 306 . sprintf( __('To change settings go %1$shere%2$s.', 'wp_reroute_email'), '<a href="' . $admin_url . 'admin.php?page=wp-reroute-email%2Fsettings.php">', '</a>')304 . sprintf(esc_html__('To change settings go %1$shere%2$s.', 'wp_reroute_email'), '<a href="' . $admin_url . 'admin.php?page=wp-reroute-email%2Fsettings.php">', '</a>') 307 305 . '</p></div>'; 308 306 }
Note: See TracChangeset
for help on using the changeset viewer.