Changeset 2443010
- Timestamp:
- 12/19/2020 06:36:43 PM (4 years ago)
- Location:
- wp-mailfrom-ii/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-mailfrom-ii/trunk/CHANGELOG.md
r2438912 r2443010 2 2 All notable changes to this project will be documented in this file. 3 3 This project adheres to [Semantic Versioning](http://semver.org/). 4 5 6 7 8 9 10 11 4 12 5 13 ## [1.2] - 2020-12-14 … … 54 62 - Fork of original [WP Mail From](https://wordpress.org/plugins/wp-mailfrom/) plugin 55 63 56 [Unreleased]: https://github.com/benhuson/wp-mailfrom/compare/1.2...HEAD 64 [Unreleased]: https://github.com/benhuson/wp-mailfrom/compare/2.0...HEAD 65 [2.0]: https://github.com/benhuson/wp-mailfrom/compare/1.2...2.0 57 66 [1.2]: https://github.com/benhuson/wp-mailfrom/compare/1.1.1...1.2 58 67 [1.1.1]: https://github.com/benhuson/wp-mailfrom/compare/1.1...1.1.1 -
wp-mailfrom-ii/trunk/README.md
r2438912 r2443010 56 56 -------------- 57 57 58 59 60 58 61 ### 1.2 59 62 Makes admin field labels clickable and removes deprecated `screen_icon()`. -
wp-mailfrom-ii/trunk/admin/class-wp-mailfrom-ii-admin.php
r2438912 r2443010 196 196 public function wp_mailfrom_ii_name_field() { 197 197 198 echo '<input name="wp_mailfrom_ii_name" type="text" id="wp_mailfrom_ii_name" value="' . esc_attr( get_option( 'wp_mailfrom_ii_name', '' ) ) . '" class="regular-text" />'; 198 $wp_mailfrom_ii = \WP_MailFrom_II::get_instance(); 199 200 echo '<input name="wp_mailfrom_ii_name" type="text" id="wp_mailfrom_ii_name" value="' . esc_attr( get_option( 'wp_mailfrom_ii_name', '' ) ) . '" class="regular-text" placeholder="' . esc_attr( $wp_mailfrom_ii->get_default_from_name() ) . '" />'; 199 201 200 202 } … … 207 209 public function wp_mailfrom_ii_email_field() { 208 210 209 echo '<input name="wp_mailfrom_ii_email" type="text" id="wp_mailfrom_ii_email" value="' . esc_attr( get_option( 'wp_mailfrom_ii_email', '' ) ) . '" class="regular-text" />'; 211 $wp_mailfrom_ii = \WP_MailFrom_II::get_instance(); 212 213 echo '<input name="wp_mailfrom_ii_email" type="text" id="wp_mailfrom_ii_email" value="' . esc_attr( get_option( 'wp_mailfrom_ii_email', '' ) ) . '" class="regular-text" placeholder="' . esc_attr( $wp_mailfrom_ii->get_default_from() ) . '" />'; 210 214 211 215 } -
wp-mailfrom-ii/trunk/public/class-wp-mailfrom-ii.php
r2187985 r2443010 156 156 * Is Default From Name 157 157 * 158 * Checks to see if the name is the default name assigned by WordPress.159 * This is defined in wp_mail() in wp-includes/pluggable.php160 *161 158 * @since 1.1 162 159 * … … 166 163 public function is_default_from_name( $name ) { 167 164 168 return 'WordPress' == $name; 165 return $this->get_default_from_name() == $name; 166 167 } 168 169 /** 170 * Get Default From Name 171 * 172 * Get the default name assigned by WordPress. 173 * This is defined in wp_mail() in wp-includes/pluggable.php 174 * 175 * @since 2.0 176 * 177 * @return string Default name. 178 */ 179 public function get_default_from_name() { 180 181 return 'WordPress'; 169 182 170 183 } … … 202 215 public function get_default_from() { 203 216 204 $sitename = strtolower( $_SERVER['SERVER_NAME'] ); 205 206 if ( substr( $sitename, 0, 4 ) == 'www.' ) { 217 global $wp_version; 218 219 /** 220 * New method of getting sitename in WordPress 5.5+ 221 * 222 * @see https://core.trac.wordpress.org/ticket/25239#comment:114 223 * @see https://core.trac.wordpress.org/changeset/48601 224 */ 225 if ( version_compare( $wp_version, '5.5' ) >= 0 ) { 226 $sitename = wp_parse_url( network_home_url(), PHP_URL_HOST ); 227 } else { 228 $sitename = strtolower( $_SERVER['SERVER_NAME'] ); 229 } 230 231 if ( 'www.' === substr( $sitename, 0, 4 ) ) { 207 232 $sitename = substr( $sitename, 4 ); 208 233 } -
wp-mailfrom-ii/trunk/readme.txt
r2438912 r2443010 4 4 Tags: mail from, from email, email from, from address, mail, email, smtp, from address, email address, from header 5 5 Requires at least: 4.3 6 Tested up to: 5. 4.47 Stable tag: 1.26 Tested up to: 5. 7 Stable tag: 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 68 68 == Changelog == 69 69 70 71 72 73 70 74 = 1.2 = 71 75 * Make admin field labels clickable. Props [Viktor Szépe](https://github.com/szepeviktor). -
wp-mailfrom-ii/trunk/wp-mailfrom-ii.php
r2438912 r2443010 5 5 * Plugin URI: https://wordpress.org/plugins/wp-mailfrom-ii/ 6 6 * Description: Allows you to configure the default email address and name used for emails sent by WordPress. 7 * Version: 1.27 * Version: 8 8 * Author: Ben Huson 9 9 * Author URI: https://github.com/benhuson/ 10 10 * Minimum WordPress Version Required: 4.3 11 * Tested up to: 5. 4.411 * Tested up to: 5. 12 12 * Text Domain: wp-mailfrom-ii 13 13 * Domain Path: /languages
Note: See TracChangeset
for help on using the changeset viewer.