Version Description
- Added the option to remove 'Register' and/or 'Lost Password' links
- Fixed a bug that sent e-mail from all plugins from this plugins setting
Download this release
Release Info
Developer | jfarthing84 |
Plugin | Theme My Login |
Version | 4.2.2 |
Comparing to | |
See all releases |
Code changes from version 4.2.1 to 4.2.2
- classes/class.widget-new.php +8 -0
- classes/class.widget-old.php +6 -0
- classes/class.wp-login.php +11 -9
- readme.txt +4 -0
- theme-my-login.php +39 -8
classes/class.widget-new.php
CHANGED
@@ -23,6 +23,8 @@ class ThemeMyLoginWidget extends WP_Widget {
|
|
23 |
$instance['show_logged'] = (empty($new_instance['show_logged'])) ? false : true;
|
24 |
$instance['show_title'] = (empty($new_instance['show_title'])) ? false : true;
|
25 |
$instance['show_links'] = (empty($new_instance['show_links'])) ? false: true;
|
|
|
|
|
26 |
$instance['show_gravatar'] = (empty($new_instance['show_gravatar'])) ? false : true;
|
27 |
$instance['gravatar_size'] = absint($new_instance['gravatar_size']);
|
28 |
$instance['registration'] = (empty($new_instance['registration'])) ? false : true;
|
@@ -40,6 +42,8 @@ class ThemeMyLoginWidget extends WP_Widget {
|
|
40 |
$defaults['show_logged'] = 1;
|
41 |
$defaults['show_title'] = 1;
|
42 |
$defaults['show_links'] = 1;
|
|
|
|
|
43 |
$defaults['show_gravatar'] = 1;
|
44 |
$defaults['gravatar_size'] = 50;
|
45 |
$defaults['registration'] = 1;
|
@@ -59,6 +63,10 @@ class ThemeMyLoginWidget extends WP_Widget {
|
|
59 |
echo '<p><input name="' . $this->get_field_name('show_title') . '" type="checkbox" id="' . $this->get_field_id('show_title') . '" value="1" ' . $is_checked . '/> <label for="' . $this->get_field_id('show_title') . '">' . __('Show Title', 'theme-my-login') . '</label></p>' . "\n";
|
60 |
$is_checked = (empty($instance['show_links'])) ? '' : 'checked="checked" ';
|
61 |
echo '<p><input name="' . $this->get_field_name('show_links') . '" type="checkbox" id="' . $this->get_field_id('show_links') . '" value="1" ' . $is_checked . '/> <label for="' . $this->get_field_id('show_links') . '">' . __('Show Action Links', 'theme-my-login') . '</label></p>' . "\n";
|
|
|
|
|
|
|
|
|
62 |
$is_checked = (empty($instance['show_gravatar'])) ? '' : 'checked="checked" ';
|
63 |
echo '<p><input name="' . $this->get_field_name('show_gravatar') . '" type="checkbox" id="' . $this->get_field_id('show_gravatar') . '" value="1" ' . $is_checked . '/> <label for="' . $this->get_field_id('show_gravatar') . '">' . __('Show Gravatar', 'theme-my-login') . '</label></p>' . "\n";
|
64 |
echo '<p>' . __('Gravatar Size', 'theme-my-login') . ': <input name="' . $this->get_field_name('gravatar_size') . '" type="text" id="' . $this->get_field_id('gravatar_size') . '" value="' . $instance['gravatar_size'] . '" size="3" /> <label for="' . $this->get_field_id('gravatar_size') . '"></label></p>' . "\n";
|
23 |
$instance['show_logged'] = (empty($new_instance['show_logged'])) ? false : true;
|
24 |
$instance['show_title'] = (empty($new_instance['show_title'])) ? false : true;
|
25 |
$instance['show_links'] = (empty($new_instance['show_links'])) ? false: true;
|
26 |
+
$instance['show_reg_link'] = (empty($new_instance['show_reg_link'])) ? false: true;
|
27 |
+
$instance['show_pass_link'] = (empty($new_instance['show_pass_link'])) ? false: true;
|
28 |
$instance['show_gravatar'] = (empty($new_instance['show_gravatar'])) ? false : true;
|
29 |
$instance['gravatar_size'] = absint($new_instance['gravatar_size']);
|
30 |
$instance['registration'] = (empty($new_instance['registration'])) ? false : true;
|
42 |
$defaults['show_logged'] = 1;
|
43 |
$defaults['show_title'] = 1;
|
44 |
$defaults['show_links'] = 1;
|
45 |
+
$defaults['show_reg_link'] = 1;
|
46 |
+
$defaults['show_pass_link'] = 1;
|
47 |
$defaults['show_gravatar'] = 1;
|
48 |
$defaults['gravatar_size'] = 50;
|
49 |
$defaults['registration'] = 1;
|
63 |
echo '<p><input name="' . $this->get_field_name('show_title') . '" type="checkbox" id="' . $this->get_field_id('show_title') . '" value="1" ' . $is_checked . '/> <label for="' . $this->get_field_id('show_title') . '">' . __('Show Title', 'theme-my-login') . '</label></p>' . "\n";
|
64 |
$is_checked = (empty($instance['show_links'])) ? '' : 'checked="checked" ';
|
65 |
echo '<p><input name="' . $this->get_field_name('show_links') . '" type="checkbox" id="' . $this->get_field_id('show_links') . '" value="1" ' . $is_checked . '/> <label for="' . $this->get_field_id('show_links') . '">' . __('Show Action Links', 'theme-my-login') . '</label></p>' . "\n";
|
66 |
+
$is_checked = (empty($instance['show_reg_link'])) ? '' : 'checked="checked" ';
|
67 |
+
echo '<p><input name="' . $this->get_field_name('show_reg_link') . '" type="checkbox" id="' . $this->get_field_id('show_reg_link') . '" value="1" ' . $is_checked . '/> <label for="' . $this->get_field_id('show_reg_link') . '">' . __('Show Register Link', 'theme-my-login') . '</label></p>' . "\n";
|
68 |
+
$is_checked = (empty($instance['show_pass_link'])) ? '' : 'checked="checked" ';
|
69 |
+
echo '<p><input name="' . $this->get_field_name('show_pass_link') . '" type="checkbox" id="' . $this->get_field_id('show_pass_link') . '" value="1" ' . $is_checked . '/> <label for="' . $this->get_field_id('show_pass_link') . '">' . __('Show Lost Password Link', 'theme-my-login') . '</label></p>' . "\n";
|
70 |
$is_checked = (empty($instance['show_gravatar'])) ? '' : 'checked="checked" ';
|
71 |
echo '<p><input name="' . $this->get_field_name('show_gravatar') . '" type="checkbox" id="' . $this->get_field_id('show_gravatar') . '" value="1" ' . $is_checked . '/> <label for="' . $this->get_field_id('show_gravatar') . '">' . __('Show Gravatar', 'theme-my-login') . '</label></p>' . "\n";
|
72 |
echo '<p>' . __('Gravatar Size', 'theme-my-login') . ': <input name="' . $this->get_field_name('gravatar_size') . '" type="text" id="' . $this->get_field_id('gravatar_size') . '" value="' . $instance['gravatar_size'] . '" size="3" /> <label for="' . $this->get_field_id('gravatar_size') . '"></label></p>' . "\n";
|
classes/class.widget-old.php
CHANGED
@@ -30,6 +30,8 @@ class ThemeMyLoginWidget {
|
|
30 |
$widget['show_logged'] = (empty($_POST['tml_show_logged'])) ? false : true;
|
31 |
$widget['show_title'] = (empty($_POST['tml_show_title'])) ? false : true;
|
32 |
$widget['show_links'] = (empty($_POST['tml_show_links'])) ? false: true;
|
|
|
|
|
33 |
$widget['show_gravatar'] = (empty($_POST['tml_show_gravatar'])) ? false : true;
|
34 |
$widget['gravatar_size'] = absint($_POST['tml_gravatar_size']);
|
35 |
$widget['registration'] = (empty($_POST['tml_registration'])) ? false : true;
|
@@ -55,6 +57,10 @@ class ThemeMyLoginWidget {
|
|
55 |
echo '<p><input name="tml_show_title" type="checkbox" id="tml_show_title" value="1" ' . $is_checked . '/> <label for="tml_show_title">' . __('Show Title', 'theme-my-login') . '</label></p>' . "\n";
|
56 |
$is_checked = (empty($widget['show_links'])) ? '' : 'checked="checked" ';
|
57 |
echo '<p><input name="tml_show_links" type="checkbox" id="tml_show_links" value="1" ' . $is_checked . '/> <label for="tml_show_links">' . __('Show Action Links', 'theme-my-login') . '</label></p>' . "\n";
|
|
|
|
|
|
|
|
|
58 |
$is_checked = (empty($widget['show_gravatar'])) ? '' : 'checked="checked" ';
|
59 |
echo '<p><input name="tml_show_gravatar" type="checkbox" id="tml_show_gravatar" value="1" ' . $is_checked . '/> <label for="tml_show_gravatar">' . __('Show Gravatar', 'theme-my-login') . '</label></p>' . "\n";
|
60 |
echo '<p>' . __('Gravatar Size', 'theme-my-login') . ': <input name="tml_gravatar_size" type="text" id="tml_gravatar_size" value="' . $widget['gravatar_size'] . '" size="3" /> <label for="tml_gravatar_size"></label></p>' . "\n";
|
30 |
$widget['show_logged'] = (empty($_POST['tml_show_logged'])) ? false : true;
|
31 |
$widget['show_title'] = (empty($_POST['tml_show_title'])) ? false : true;
|
32 |
$widget['show_links'] = (empty($_POST['tml_show_links'])) ? false: true;
|
33 |
+
$widget['show_reg_link'] = (empty($_POST['tml_show_reg_link'])) ? false: true;
|
34 |
+
$widget['show_pass_link'] = (empty($_POST['tml_show_pass_link'])) ? false: true;
|
35 |
$widget['show_gravatar'] = (empty($_POST['tml_show_gravatar'])) ? false : true;
|
36 |
$widget['gravatar_size'] = absint($_POST['tml_gravatar_size']);
|
37 |
$widget['registration'] = (empty($_POST['tml_registration'])) ? false : true;
|
57 |
echo '<p><input name="tml_show_title" type="checkbox" id="tml_show_title" value="1" ' . $is_checked . '/> <label for="tml_show_title">' . __('Show Title', 'theme-my-login') . '</label></p>' . "\n";
|
58 |
$is_checked = (empty($widget['show_links'])) ? '' : 'checked="checked" ';
|
59 |
echo '<p><input name="tml_show_links" type="checkbox" id="tml_show_links" value="1" ' . $is_checked . '/> <label for="tml_show_links">' . __('Show Action Links', 'theme-my-login') . '</label></p>' . "\n";
|
60 |
+
$is_checked = (empty($widget['show_reg_link'])) ? '' : 'checked="checked" ';
|
61 |
+
echo '<p><input name="tml_show_reg_link" type="checkbox" id="tml_show_reg_link" value="1" ' . $is_checked . '/> <label for="tml_show_reg_link">' . __('Show Registration Link', 'theme-my-login') . '</label></p>' . "\n";
|
62 |
+
$is_checked = (empty($widget['show_pass_link'])) ? '' : 'checked="checked" ';
|
63 |
+
echo '<p><input name="tml_show_pass_link" type="checkbox" id="tml_show_pass_link" value="1" ' . $is_checked . '/> <label for="tml_show_pass_link">' . __('Show Lost Password Link', 'theme-my-login') . '</label></p>' . "\n";
|
64 |
$is_checked = (empty($widget['show_gravatar'])) ? '' : 'checked="checked" ';
|
65 |
echo '<p><input name="tml_show_gravatar" type="checkbox" id="tml_show_gravatar" value="1" ' . $is_checked . '/> <label for="tml_show_gravatar">' . __('Show Gravatar', 'theme-my-login') . '</label></p>' . "\n";
|
66 |
echo '<p>' . __('Gravatar Size', 'theme-my-login') . ': <input name="tml_gravatar_size" type="text" id="tml_gravatar_size" value="' . $widget['gravatar_size'] . '" size="3" /> <label for="tml_gravatar_size"></label></p>' . "\n";
|
classes/class.wp-login.php
CHANGED
@@ -214,17 +214,19 @@ if ( !class_exists('WPLogin') ) {
|
|
214 |
$url = $this->GuessURL(array('instance' => $instance, 'action' => 'login'));
|
215 |
echo '<li><a href="' . $url . '">' . $this->options['titles']['login'] . '</a></li>' . "\n";
|
216 |
}
|
217 |
-
if (get_option('users_can_register')) {
|
218 |
if ( 'register' != $action ) {
|
219 |
$url = ($this->options['widget']['registration']) ? $this->GuessURL(array('instance' => $instance, 'action' => 'register')) : site_url('wp-login.php?action=register', 'login');
|
220 |
$url = apply_filters('login_footer_registration_link', $url);
|
221 |
echo '<li><a href="' . $url . '">' . $this->options['titles']['register'] . '</a></li>' . "\n";
|
222 |
}
|
223 |
}
|
224 |
-
if ( '
|
225 |
-
|
226 |
-
|
227 |
-
|
|
|
|
|
228 |
}
|
229 |
echo '</ul>' . "\n";
|
230 |
}
|
@@ -547,10 +549,10 @@ 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 |
-
|
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 |
-
|
554 |
|
555 |
return true;
|
556 |
}
|
@@ -586,10 +588,10 @@ if ( !class_exists('WPLogin') ) {
|
|
586 |
$title = apply_filters('password_reset_title', $title, $user);
|
587 |
$message = apply_filters('password_reset_message', $message, $new_pass, $user);
|
588 |
|
589 |
-
|
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 |
-
|
593 |
|
594 |
if ( !$this->options['emails']['resetpassword']['admin-disable'] )
|
595 |
wp_password_change_notification($user);
|
214 |
$url = $this->GuessURL(array('instance' => $instance, 'action' => 'login'));
|
215 |
echo '<li><a href="' . $url . '">' . $this->options['titles']['login'] . '</a></li>' . "\n";
|
216 |
}
|
217 |
+
if ( isset($this->options['widget']['show_reg_link']) && true == $this->options['widget']['show_reg_link'] && get_option('users_can_register') ) {
|
218 |
if ( 'register' != $action ) {
|
219 |
$url = ($this->options['widget']['registration']) ? $this->GuessURL(array('instance' => $instance, 'action' => 'register')) : site_url('wp-login.php?action=register', 'login');
|
220 |
$url = apply_filters('login_footer_registration_link', $url);
|
221 |
echo '<li><a href="' . $url . '">' . $this->options['titles']['register'] . '</a></li>' . "\n";
|
222 |
}
|
223 |
}
|
224 |
+
if ( isset($this->options['widget']['show_pass_link']) && true == $this->options['widget']['show_pass_link'] ) {
|
225 |
+
if ( 'lostpassword' != $action ) {
|
226 |
+
$url = ($this->options['widget']['lostpassword']) ? $this->GuessURL(array('instance' => $instance, 'action' => 'lostpassword')) : site_url('wp-login.php?action=lostpassword', 'login');
|
227 |
+
$url = apply_filters('login_footer_forgotpassword_link', $url);
|
228 |
+
echo '<li><a href="' . $url . '">' . $this->options['titles']['lostpassword'] . '</a></li>' . "\n";
|
229 |
+
}
|
230 |
}
|
231 |
echo '</ul>' . "\n";
|
232 |
}
|
549 |
$title = apply_filters('retrieve_password_title', $title, $user_data);
|
550 |
$message = apply_filters('retrieve_password_message', $message, $key, $user_data);
|
551 |
|
552 |
+
tml_apply_mail_filters();
|
553 |
if ( $message && !wp_mail($user_email, $title, $message) )
|
554 |
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
|
555 |
+
tml_remove_mail_filters();
|
556 |
|
557 |
return true;
|
558 |
}
|
588 |
$title = apply_filters('password_reset_title', $title, $user);
|
589 |
$message = apply_filters('password_reset_message', $message, $new_pass, $user);
|
590 |
|
591 |
+
tml_apply_mail_filters();
|
592 |
if ( $message && !wp_mail($user->user_email, $title, $message) )
|
593 |
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
|
594 |
+
tml_remove_mail_filters();
|
595 |
|
596 |
if ( !$this->options['emails']['resetpassword']['admin-disable'] )
|
597 |
wp_password_change_notification($user);
|
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.1 =
|
42 |
* Fixed a bug that broke other plugins e-mail format
|
43 |
* Fixed a bug that could break plugin upon upgrade
|
38 |
|
39 |
== Changelog ==
|
40 |
|
41 |
+
= 4.2.2 =
|
42 |
+
* Added the option to remove 'Register' and/or 'Lost Password' links
|
43 |
+
* Fixed a bug that sent e-mail from all plugins from this plugins setting
|
44 |
+
|
45 |
= 4.2.1 =
|
46 |
* Fixed a bug that broke other plugins e-mail format
|
47 |
* Fixed a bug that could break plugin upon upgrade
|
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;
|
@@ -67,9 +67,6 @@ if (!class_exists('ThemeMyLogin')) {
|
|
67 |
$this->SaveOptions();
|
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 |
|
75 |
}
|
@@ -142,6 +139,8 @@ if (!class_exists('ThemeMyLogin')) {
|
|
142 |
$this->options['widget']['default_action'] = 'login';
|
143 |
$this->options['widget']['show_title'] = 1;
|
144 |
$this->options['widget']['show_links'] = 1;
|
|
|
|
|
145 |
$this->options['widget']['registration'] = 1;
|
146 |
$this->options['widget']['lostpassword'] = 1;
|
147 |
$this->options['widget']['show_logged'] = 1;
|
@@ -470,7 +469,7 @@ if (!class_exists('ThemeMyLogin')) {
|
|
470 |
$options['titles'][$key] = $value;
|
471 |
elseif ( in_array($key, array('register', 'success', 'lostpassword')) )
|
472 |
$options['messages'][$key] = $value;
|
473 |
-
elseif ( in_array($key, array('instance', 'default_action', 'show_title', 'show_links', 'registration', 'lostpassword', 'show_logged', 'show_gravatar', 'gravatar_size', 'before_widget', 'after_widget', 'before_title', 'after_title')) )
|
474 |
$options['widget'][$key] = $value;
|
475 |
} else {
|
476 |
foreach ( $value as $k => $v )
|
@@ -556,18 +555,50 @@ if (class_exists('ThemeMyLogin')) {
|
|
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 |
-
|
560 |
wp_mail($user_email, $subject, $message);
|
561 |
-
|
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 |
|
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.2
|
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.2';
|
25 |
var $options = array();
|
26 |
var $permalink = '';
|
27 |
var $instances = 0;
|
67 |
$this->SaveOptions();
|
68 |
}
|
69 |
|
|
|
|
|
|
|
70 |
$this->WPPluginShell();
|
71 |
|
72 |
}
|
139 |
$this->options['widget']['default_action'] = 'login';
|
140 |
$this->options['widget']['show_title'] = 1;
|
141 |
$this->options['widget']['show_links'] = 1;
|
142 |
+
$this->options['widget']['show_reg_link'] = 1;
|
143 |
+
$this->options['widget']['show_pass_link'] = 1;
|
144 |
$this->options['widget']['registration'] = 1;
|
145 |
$this->options['widget']['lostpassword'] = 1;
|
146 |
$this->options['widget']['show_logged'] = 1;
|
469 |
$options['titles'][$key] = $value;
|
470 |
elseif ( in_array($key, array('register', 'success', 'lostpassword')) )
|
471 |
$options['messages'][$key] = $value;
|
472 |
+
elseif ( in_array($key, array('instance', 'default_action', 'show_title', 'show_links', 'show_reg_link', 'show_pass_link', 'registration', 'lostpassword', 'show_logged', 'show_gravatar', 'gravatar_size', 'before_widget', 'after_widget', 'before_title', 'after_title')) )
|
473 |
$options['widget'][$key] = $value;
|
474 |
} else {
|
475 |
foreach ( $value as $k => $v )
|
555 |
$message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
|
556 |
$message .= ( version_compare($wp_version, '2.7', '>=') ) ? wp_login_url() . "\r\n" : site_url('wp-login.php', 'login') . "\r\n";
|
557 |
}
|
558 |
+
tml_apply_mail_filters();
|
559 |
wp_mail($user_email, $subject, $message);
|
560 |
+
tml_remove_mail_filters();
|
561 |
}
|
562 |
|
563 |
}
|
564 |
endif;
|
565 |
|
566 |
+
if ( !function_exists('tml_wp_mail_from') ) :
|
567 |
+
function tml_wp_mail_from($from) {
|
568 |
+
global $ThemeMyLogin;
|
569 |
+
return empty($ThemeMyLogin->options['general']['from_email']) ? $from : $ThemeMyLogin->options['general']['from_email'];
|
570 |
+
}
|
571 |
+
endif;
|
572 |
+
|
573 |
+
if ( !function_exists('tml_wp_mail_from_name') ) :
|
574 |
+
function tml_wp_mail_from_name($from_name) {
|
575 |
+
global $ThemeMyLogin;
|
576 |
+
return empty($ThemeMyLogin->options['general']['from_name']) ? $from_name : $ThemeMyLogin->options['general']['from_name'];
|
577 |
+
}
|
578 |
+
endif;
|
579 |
+
|
580 |
+
if ( !function_exists('tml_wp_mail_content_type') ) :
|
581 |
function tml_wp_mail_content_type() {
|
582 |
global $ThemeMyLogin;
|
583 |
return $ThemeMyLogin->options['general']['email_format'];
|
584 |
}
|
585 |
+
endif;
|
586 |
+
|
587 |
+
if ( !function_exists('tml_apply_mail_filters') ) :
|
588 |
+
function tml_apply_mail_filters() {
|
589 |
+
$filters = array('wp_mail_from', 'wp_mail_from_name', 'wp_mail_content_type');
|
590 |
+
foreach ( $filters as $filter )
|
591 |
+
add_filter($filter, 'tml_'.$filter);
|
592 |
+
}
|
593 |
+
endif;
|
594 |
+
|
595 |
+
if ( !function_exists('tml_remove_mail_filters') ) :
|
596 |
+
function tml_remove_mail_filters() {
|
597 |
+
$filters = array('wp_mail_from', 'wp_mail_from_name', 'wp_mail_content_type');
|
598 |
+
foreach ( $filters as $filter )
|
599 |
+
remove_filter($filter, 'tml_'.$filter);
|
600 |
+
}
|
601 |
+
endif;
|
602 |
|
603 |
}
|
604 |
|