Version Description
- Fixed a bug that broke other plugins e-mail format
- Fixed a bug that could break plugin upon upgrade
Download this release
Release Info
Developer | jfarthing84 |
Plugin | Theme My Login |
Version | 4.2.1 |
Comparing to | |
See all releases |
Code changes from version 4.2 to 4.2.1
- classes/class.wp-login.php +7 -3
- readme.txt +4 -0
- theme-my-login.php +17 -7
classes/class.wp-login.php
CHANGED
@@ -23,7 +23,7 @@ if ( !class_exists('WPLogin') ) {
|
|
23 |
$this->textdomain = $textdomain;
|
24 |
|
25 |
$this->LoadOptions($options);
|
26 |
-
|
27 |
$this->ForceSSL();
|
28 |
|
29 |
$this->action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
|
@@ -547,9 +547,11 @@ if ( !class_exists('WPLogin') ) {
|
|
547 |
$title = apply_filters('retrieve_password_title', $title, $user_data);
|
548 |
$message = apply_filters('retrieve_password_message', $message, $key, $user_data);
|
549 |
|
|
|
550 |
if ( $message && !wp_mail($user_email, $title, $message) )
|
551 |
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
|
552 |
-
|
|
|
553 |
return true;
|
554 |
}
|
555 |
|
@@ -584,9 +586,11 @@ if ( !class_exists('WPLogin') ) {
|
|
584 |
$title = apply_filters('password_reset_title', $title, $user);
|
585 |
$message = apply_filters('password_reset_message', $message, $new_pass, $user);
|
586 |
|
|
|
587 |
if ( $message && !wp_mail($user->user_email, $title, $message) )
|
588 |
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
|
589 |
-
|
|
|
590 |
if ( !$this->options['emails']['resetpassword']['admin-disable'] )
|
591 |
wp_password_change_notification($user);
|
592 |
|
23 |
$this->textdomain = $textdomain;
|
24 |
|
25 |
$this->LoadOptions($options);
|
26 |
+
|
27 |
$this->ForceSSL();
|
28 |
|
29 |
$this->action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
|
547 |
$title = apply_filters('retrieve_password_title', $title, $user_data);
|
548 |
$message = apply_filters('retrieve_password_message', $message, $key, $user_data);
|
549 |
|
550 |
+
add_filter('wp_mail_content_type', 'tml_wp_mail_content_type');
|
551 |
if ( $message && !wp_mail($user_email, $title, $message) )
|
552 |
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
|
553 |
+
remove_filter('wp_mail_content_type', 'tml_wp_mail_content_type');
|
554 |
+
|
555 |
return true;
|
556 |
}
|
557 |
|
586 |
$title = apply_filters('password_reset_title', $title, $user);
|
587 |
$message = apply_filters('password_reset_message', $message, $new_pass, $user);
|
588 |
|
589 |
+
add_filter('wp_mail_content_type', 'tml_wp_mail_content_type');
|
590 |
if ( $message && !wp_mail($user->user_email, $title, $message) )
|
591 |
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
|
592 |
+
remove_filter('wp_mail_content_type', 'tml_wp_mail_content_type');
|
593 |
+
|
594 |
if ( !$this->options['emails']['resetpassword']['admin-disable'] )
|
595 |
wp_password_change_notification($user);
|
596 |
|
readme.txt
CHANGED
@@ -38,6 +38,10 @@ None yet. Please visit http://www.jfarthing.com/forum for any support!
|
|
38 |
|
39 |
== Changelog ==
|
40 |
|
|
|
|
|
|
|
|
|
41 |
= 4.2 =
|
42 |
* Added the option to send e-mails in HTML format
|
43 |
* Fixed a bug that broke custom user role links if all links were deleted
|
38 |
|
39 |
== Changelog ==
|
40 |
|
41 |
+
= 4.2.1 =
|
42 |
+
* Fixed a bug that broke other plugins e-mail format
|
43 |
+
* Fixed a bug that could break plugin upon upgrade
|
44 |
+
|
45 |
= 4.2 =
|
46 |
* Added the option to send e-mails in HTML format
|
47 |
* Fixed a bug that broke custom user role links if all links were deleted
|
theme-my-login.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Theme My Login
|
4 |
Plugin URI: http://www.jfarthing.com/wordpress-plugins/theme-my-login-plugin
|
5 |
Description: Themes the WordPress login, registration and forgot password pages according to your theme.
|
6 |
-
Version: 4.2
|
7 |
Author: Jeff Farthing
|
8 |
Author URI: http://www.jfarthing.com
|
9 |
Text Domain: theme-my-login
|
@@ -21,7 +21,7 @@ if ($wp_version < '2.6') {
|
|
21 |
if (!class_exists('ThemeMyLogin')) {
|
22 |
class ThemeMyLogin extends WPPluginShell {
|
23 |
|
24 |
-
var $version = '4.2';
|
25 |
var $options = array();
|
26 |
var $permalink = '';
|
27 |
var $instances = 0;
|
@@ -68,7 +68,7 @@ if (!class_exists('ThemeMyLogin')) {
|
|
68 |
}
|
69 |
|
70 |
$this->SetMailFrom($this->options['general']['from_email'], $this->options['general']['from_name']);
|
71 |
-
|
72 |
|
73 |
$this->WPPluginShell();
|
74 |
|
@@ -104,9 +104,9 @@ if (!class_exists('ThemeMyLogin')) {
|
|
104 |
}
|
105 |
}
|
106 |
}
|
107 |
-
|
108 |
-
$options
|
109 |
-
$this->
|
110 |
$this->SaveOptions();
|
111 |
}
|
112 |
|
@@ -453,6 +453,10 @@ if (!class_exists('ThemeMyLogin')) {
|
|
453 |
}
|
454 |
return $message;
|
455 |
}
|
|
|
|
|
|
|
|
|
456 |
|
457 |
function ThemeMyLoginShortcode($args = array()) {
|
458 |
global $WPLogin;
|
@@ -552,12 +556,18 @@ if (class_exists('ThemeMyLogin')) {
|
|
552 |
$message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
|
553 |
$message .= ( version_compare($wp_version, '2.7', '>=') ) ? wp_login_url() . "\r\n" : site_url('wp-login.php', 'login') . "\r\n";
|
554 |
}
|
555 |
-
|
556 |
wp_mail($user_email, $subject, $message);
|
|
|
557 |
}
|
558 |
|
559 |
}
|
560 |
endif;
|
|
|
|
|
|
|
|
|
|
|
561 |
|
562 |
}
|
563 |
|
3 |
Plugin Name: Theme My Login
|
4 |
Plugin URI: http://www.jfarthing.com/wordpress-plugins/theme-my-login-plugin
|
5 |
Description: Themes the WordPress login, registration and forgot password pages according to your theme.
|
6 |
+
Version: 4.2.1
|
7 |
Author: Jeff Farthing
|
8 |
Author URI: http://www.jfarthing.com
|
9 |
Text Domain: theme-my-login
|
21 |
if (!class_exists('ThemeMyLogin')) {
|
22 |
class ThemeMyLogin extends WPPluginShell {
|
23 |
|
24 |
+
var $version = '4.2.1';
|
25 |
var $options = array();
|
26 |
var $permalink = '';
|
27 |
var $instances = 0;
|
68 |
}
|
69 |
|
70 |
$this->SetMailFrom($this->options['general']['from_email'], $this->options['general']['from_name']);
|
71 |
+
//$this->SetMailContentType($this->options['general']['email_format']);
|
72 |
|
73 |
$this->WPPluginShell();
|
74 |
|
104 |
}
|
105 |
}
|
106 |
}
|
107 |
+
|
108 |
+
$this->options['general']['page_id'] = $page_id;
|
109 |
+
$this->options['general']['version'] = $this->version;
|
110 |
$this->SaveOptions();
|
111 |
}
|
112 |
|
453 |
}
|
454 |
return $message;
|
455 |
}
|
456 |
+
|
457 |
+
function WPMailContentType() {
|
458 |
+
return $this->options['general']['email_format'];
|
459 |
+
}
|
460 |
|
461 |
function ThemeMyLoginShortcode($args = array()) {
|
462 |
global $WPLogin;
|
556 |
$message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
|
557 |
$message .= ( version_compare($wp_version, '2.7', '>=') ) ? wp_login_url() . "\r\n" : site_url('wp-login.php', 'login') . "\r\n";
|
558 |
}
|
559 |
+
add_filter('wp_mail_content_type', 'tml_wp_mail_content_type');
|
560 |
wp_mail($user_email, $subject, $message);
|
561 |
+
remove_filter('wp_mail_content_type', 'tml_wp_mail_content_type');
|
562 |
}
|
563 |
|
564 |
}
|
565 |
endif;
|
566 |
+
|
567 |
+
function tml_wp_mail_content_type() {
|
568 |
+
global $ThemeMyLogin;
|
569 |
+
return $ThemeMyLogin->options['general']['email_format'];
|
570 |
+
}
|
571 |
|
572 |
}
|
573 |
|