Changeset 2527305
- Timestamp:
- 05/06/2021 02:04:32 PM (5 years ago)
- Location:
- wp-change-default-from-email
- Files:
-
- 28 added
- 5 edited
-
tags/1.1.4 (added)
-
tags/1.1.4/WCDFE.php (added)
-
tags/1.1.4/admin (added)
-
tags/1.1.4/admin/WCDFE_Admin.php (added)
-
tags/1.1.4/admin/index.php (added)
-
tags/1.1.4/admin/pages (added)
-
tags/1.1.4/admin/pages/index.php (added)
-
tags/1.1.4/admin/pages/settings.php (added)
-
tags/1.1.4/assets (added)
-
tags/1.1.4/assets/css (added)
-
tags/1.1.4/assets/css/admin.css (added)
-
tags/1.1.4/assets/index.php (added)
-
tags/1.1.4/index.php (added)
-
tags/1.1.4/languages (added)
-
tags/1.1.4/languages/WCDFE_translation-ar_SA.mo (added)
-
tags/1.1.4/languages/WCDFE_translation-ar_SA.po (added)
-
tags/1.1.4/languages/WCDFE_translation-de_DE.mo (added)
-
tags/1.1.4/languages/WCDFE_translation-de_DE.po (added)
-
tags/1.1.4/languages/WCDFE_translation-es_ES.mo (added)
-
tags/1.1.4/languages/WCDFE_translation-es_ES.po (added)
-
tags/1.1.4/languages/WCDFE_translation-fr_FR.mo (added)
-
tags/1.1.4/languages/WCDFE_translation-fr_FR.po (added)
-
tags/1.1.4/languages/WCDFE_translation-ru_RU.mo (added)
-
tags/1.1.4/languages/WCDFE_translation-ru_RU.po (added)
-
tags/1.1.4/readme.txt (added)
-
tags/1.1.4/screenshot-1.jpg (added)
-
tags/1.1.4/screenshot-2.jpg (added)
-
tags/1.1.4/uninstall.php (added)
-
trunk/WCDFE.php (modified) (1 diff)
-
trunk/admin/WCDFE_Admin.php (modified) (3 diffs)
-
trunk/admin/pages/settings.php (modified) (3 diffs)
-
trunk/assets/css/admin.css (modified) (3 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-change-default-from-email/trunk/WCDFE.php
r2504339 r2527305 2 2 /** 3 3 * Plugin Name: WP Change Default From Email 4 * Plugin URI: 4 * Plugin URI: https://wordpress.org/plugins/wp-change-default-from-email/ 5 5 * Text Domain: WCDFE_translation 6 6 * Domain Path: /languages 7 7 * Description: A simple and easy way to change the from email address and from email name that appear on emails sent from WordPress. 8 * Version: 1.1. 38 * Version: 1.1.4 9 9 * Author: Subodh Ghulaxe 10 10 * Author URI: http://www.subodhghulaxe.com -
wp-change-default-from-email/trunk/admin/WCDFE_Admin.php
r1118443 r2527305 1 1 <?php 2 2 3 // avoid direct calls to this file where wp core files not present3 // Avoid direct calls to this file where wp core files not present 4 4 if (!function_exists ('add_action')) { 5 5 header('Status: 403 Forbidden'); … … 81 81 check_ajax_referer( 'wcdfe-save-settings', 'security' ); 82 82 83 $wcdfe_settings = isset($_POST['wcdfe_settings']) ? $_POST['wcdfe_settings'] : array(); 83 // Sanitize inputs 84 $wcdfe_settings = isset($_POST['wcdfe_settings']) ? (array) array_map('sanitize_text_field', $_POST['wcdfe_settings']) : array(); 84 85 85 86 if( isset($wcdfe_settings['from_name']) && empty($wcdfe_settings['from_name']) ) { … … 94 95 if(empty($error)) { 95 96 // Save setting in WordPress options 96 $result = update_option('wcdfe_settings',$wcdfe_settings); 97 if($result){ 98 $response['status'] = 'success'; 99 $response['message'] = __( 'Settings updated successfully.', WCDFE_TEXTDOMAIN ); 100 } else { 101 $response['status'] = 'error'; 102 $response['message'] = __( 'No settings were updated.', WCDFE_TEXTDOMAIN ); 103 } 97 update_option('wcdfe_settings', $wcdfe_settings); 98 $response['status'] = 'success'; 99 $response['message'] = __( 'Settings updated successfully.', WCDFE_TEXTDOMAIN ); 104 100 } else { 105 101 $response['status'] = 'error'; -
wp-change-default-from-email/trunk/admin/pages/settings.php
r2504339 r2527305 50 50 51 51 <div class="wcdfe-save-settings-container"> 52 <input type="submit" value="<?php echo __( 'Save Settings', WCDFE_TEXTDOMAIN ); ?>" class="button button-large button-primary " id="wcdfe-save-settings" name="save_settings">52 <input type="submit" value="<?php echo __( 'Save Settings', WCDFE_TEXTDOMAIN ); ?>" class="button button-large button-primary wcdfe-button" id="wcdfe-save-settings" name="save_settings"> 53 53 <div id="wcdfe-error-message"></div> 54 54 </div> … … 104 104 jQuery("#wcdfe-save-settings").on('click', function(e) { 105 105 e.preventDefault(); 106 jQuery("#wcdfe-error-message").html(''); 107 jQuery("#wcdfe-save-settings").val("Saving Settings ..."); 108 jQuery("#wcdfe-save-settings").addClass("is-busy"); 109 106 110 var data = jQuery("#wcdfe-settings-form").serialize(); 107 111 jQuery.ajax({ … … 118 122 jQuery("#wcdfe-error-message").html('<div class="error"><p><?php echo __( "No settings were saved.", WCDFE_TEXTDOMAIN ); ?></p></div>'); 119 123 } 124 jQuery("#wcdfe-save-settings").val("Save Settings"); 125 jQuery("#wcdfe-save-settings").removeClass("is-busy"); 126 }, 127 error: function (jqXHR, exception) { 128 var msg = ''; 129 if (jqXHR.status === 0) { 130 msg = 'Not connect.\n Verify Network.'; 131 } else if (jqXHR.status == 404) { 132 msg = 'Requested page not found. [404]'; 133 } else if (jqXHR.status == 500) { 134 msg = 'Internal Server Error [500].'; 135 } else if (exception === 'parsererror') { 136 msg = 'Requested JSON parse failed.'; 137 } else if (exception === 'timeout') { 138 msg = 'Time out error.'; 139 } else if (exception === 'abort') { 140 msg = 'Request aborted.'; 141 } else { 142 msg = 'Uncaught Error.\n' + jqXHR.responseText; 143 } 144 jQuery("#wcdfe-error-message").html('<div class="error"><p>' + msg + '</p></div>'); 145 jQuery("#wcdfe-save-settings").val("Saving Settings"); 146 jQuery("#wcdfe-save-settings").removeClass("is-busy"); 120 147 } 121 148 }); -
wp-change-default-from-email/trunk/assets/css/admin.css
r1118443 r2527305 1 @keyframes wcdfe-button__busy-animation { 2 0% { 3 background-position: 200px 0; 4 } 5 } 6 .wcdfe-button.is-busy, 7 .wcdfe-button.is-busy:hover, 8 .wcdfe-button.is-busy:active, 9 .wcdfe-button.is-busy:focus { 10 animation: wcdfe-button__busy-animation 2.5s linear infinite; 11 background-image: linear-gradient( 12 -45deg, 13 #007cba 33%, 14 #005a87 0, 15 #005a87 70%, 16 #007cba 0 17 ); 18 } 1 19 .wcdfe-row{ 2 20 clear: both; … … 26 44 .wcdfe-onoffswitch { 27 45 position: relative; width: 90px; 28 -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none; 46 user-select: none; 47 -webkit-user-select: none; 48 -moz-user-select: none; 49 -ms-user-select: none; 29 50 } 30 51 .wcdfe-onoffswitch-checkbox { … … 81 102 position: relative; 82 103 display: inline-block; 104 margin-left: 10px; 83 105 } 84 106 #wcdfe-error-message .updated, #wcdfe-error-message .error { -
wp-change-default-from-email/trunk/readme.txt
r2504339 r2527305 4 4 Donate link: https://www.patreon.com/subodhghulaxe 5 5 Requires at least: 2.7 6 Tested up to: 5.7 7 Stable tag: trunk 6 Tested up to: 5.7.1 7 Requires PHP: 5.2.4 8 Stable tag: 1.1.4 8 9 License: GPLv2 or later 9 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 24 25 * **Easy Settings.** Easy to enable/disable and change settings 25 26 * **Clean & Well Commented Code.** Easy to enable/disable and change settings 27 28 **Please support my other plugins:** 29 <ol> 30 <li> 31 <a href="https://wordpress.org/plugins/change-login-page-logo/">Change Login Page Logo</a> 32 </li> 33 <li> 34 <a href="https://wordpress.org/plugins/hide-admin-bar-for-user-roles/">Hide Admin Bar For User Roles</a> 35 </li> 36 </ol> 26 37 27 38 **Translations/Languages:** … … 80 91 Updated contact information 81 92 93 = 1.1.4 = 94 Updated tested up to 5.7.1 95 Improved security by sanitizing inputs 96 82 97 == Upgrade Notice == 83 98 = 1.0.0 = … … 97 112 Updated screenshots 98 113 Updated contact information 114 115 = 1.1.4 = 116 Updated tested up to 5.7.1 117 Improved security by sanitizing inputs
Note: See TracChangeset
for help on using the changeset viewer.