Version Description
Download this release
Release Info
Developer | ultimatemember |
Plugin | Ultimate Member – User Profile & Membership Plugin |
Version | 1.0.66 |
Comparing to | |
See all releases |
Code changes from version 1.0.65 to 1.0.66
- core/um-enqueue.php +3 -3
- core/um-mail.php +41 -4
- core/um-short-functions.php +12 -0
- index.php +2 -2
- readme.txt +6 -1
- templates/email/approval_email.html +9 -0
- templates/email/changedpw_email.html +3 -0
- templates/email/checkmail_email.html +3 -0
- templates/email/deletion_email.html +3 -0
- templates/email/footer.html +11 -0
- templates/email/header.html +12 -0
- templates/email/inactive_email.html +3 -0
- templates/email/pending_email.html +3 -0
- templates/email/rejected_email.html +3 -0
- templates/email/resetpw_email.html +5 -0
- templates/email/welcome_email.html +9 -0
- um-config.php +8 -0
core/um-enqueue.php
CHANGED
@@ -81,10 +81,10 @@ class UM_Enqueue {
|
|
81 |
|
82 |
} else {
|
83 |
|
84 |
-
wp_register_script('um_minified', um_url . 'assets/js/um.min.js', array('jquery'),
|
85 |
wp_enqueue_script('um_minified');
|
86 |
|
87 |
-
wp_register_style('um_minified', um_url . 'assets/css/um.min.css' );
|
88 |
wp_enqueue_style('um_minified');
|
89 |
|
90 |
}
|
@@ -92,7 +92,7 @@ class UM_Enqueue {
|
|
92 |
// load a localized version for date/time
|
93 |
$locale = get_option('WPLANG');
|
94 |
if ( $locale && file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
|
95 |
-
wp_register_script('um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', '',
|
96 |
wp_enqueue_script('um_datetime_locale');
|
97 |
}
|
98 |
|
81 |
|
82 |
} else {
|
83 |
|
84 |
+
wp_register_script('um_minified', um_url . 'assets/js/um.min.js', array('jquery'), ultimatemember_version, true );
|
85 |
wp_enqueue_script('um_minified');
|
86 |
|
87 |
+
wp_register_style('um_minified', um_url . 'assets/css/um.min.css', '', ultimatemember_version, 'all' );
|
88 |
wp_enqueue_style('um_minified');
|
89 |
|
90 |
}
|
92 |
// load a localized version for date/time
|
93 |
$locale = get_option('WPLANG');
|
94 |
if ( $locale && file_exists( um_path . 'assets/js/pickadate/translations/' . $locale . '.js' ) ) {
|
95 |
+
wp_register_script('um_datetime_locale', um_url . 'assets/js/pickadate/translations/' . $locale . '.js', '', ultimatemember_version, true );
|
96 |
wp_enqueue_script('um_datetime_locale');
|
97 |
}
|
98 |
|
core/um-mail.php
CHANGED
@@ -14,12 +14,27 @@ class UM_Mail {
|
|
14 |
function mandrill_nl2br($nl2br, $message = '') {
|
15 |
|
16 |
// text emails
|
17 |
-
|
|
|
|
|
18 |
|
19 |
return $nl2br;
|
20 |
|
21 |
}
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
/***
|
24 |
*** @sends an email to any user
|
25 |
***/
|
@@ -30,17 +45,37 @@ class UM_Mail {
|
|
30 |
if ( !is_email( $email ) ) return;
|
31 |
|
32 |
$this->attachments = null;
|
33 |
-
|
34 |
$this->headers = 'From: '. um_get_option('mail_from') .' <'. um_get_option('mail_from_addr') .'>' . "\r\n";
|
35 |
|
36 |
$this->subject = um_get_option( $template . '_sub' );
|
37 |
$this->subject = $this->convert_tags( $this->subject );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
-
|
40 |
$this->message = $this->convert_tags( $this->message );
|
41 |
|
|
|
|
|
42 |
wp_mail( $email, $this->subject, $this->message, $this->headers, $this->attachments );
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
|
46 |
/***
|
@@ -63,6 +98,7 @@ class UM_Mail {
|
|
63 |
'{admin_email}',
|
64 |
'{user_profile_link}',
|
65 |
'{submitted_registration}',
|
|
|
66 |
);
|
67 |
|
68 |
$search = apply_filters('um_template_tags_patterns_hook', $search);
|
@@ -82,6 +118,7 @@ class UM_Mail {
|
|
82 |
um_admin_email(),
|
83 |
um_user_profile_url(),
|
84 |
um_user_submitted_registration(),
|
|
|
85 |
);
|
86 |
|
87 |
$replace = apply_filters('um_template_tags_replaces_hook', $replace);
|
14 |
function mandrill_nl2br($nl2br, $message = '') {
|
15 |
|
16 |
// text emails
|
17 |
+
if ( !um_get_option('email_html') ) {
|
18 |
+
$nl2br = true;
|
19 |
+
}
|
20 |
|
21 |
return $nl2br;
|
22 |
|
23 |
}
|
24 |
|
25 |
+
/***
|
26 |
+
*** @check If template exists
|
27 |
+
***/
|
28 |
+
function email_template( $template ) {
|
29 |
+
if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/email/' . $template . '.html' ) ) {
|
30 |
+
return get_stylesheet_directory() . '/ultimate-member/templates/email/' . $template . '.html';
|
31 |
+
}
|
32 |
+
if ( file_exists( um_path . 'templates/email/' . $template . '.html' ) ) {
|
33 |
+
return um_url . 'templates/email/' . $template . '.html';
|
34 |
+
}
|
35 |
+
return false;
|
36 |
+
}
|
37 |
+
|
38 |
/***
|
39 |
*** @sends an email to any user
|
40 |
***/
|
45 |
if ( !is_email( $email ) ) return;
|
46 |
|
47 |
$this->attachments = null;
|
|
|
48 |
$this->headers = 'From: '. um_get_option('mail_from') .' <'. um_get_option('mail_from_addr') .'>' . "\r\n";
|
49 |
|
50 |
$this->subject = um_get_option( $template . '_sub' );
|
51 |
$this->subject = $this->convert_tags( $this->subject );
|
52 |
+
|
53 |
+
// HTML e-mail
|
54 |
+
if ( um_get_option('email_html') && $this->email_template( $template ) ) {
|
55 |
+
$this->message = file_get_contents( $this->email_template( 'header' ) );
|
56 |
+
$this->message .= file_get_contents( $this->email_template( $template ) );
|
57 |
+
$this->message .= file_get_contents( $this->email_template( 'footer' ) );
|
58 |
+
} else {
|
59 |
+
$this->message = um_get_option( $template );
|
60 |
+
}
|
61 |
|
62 |
+
// Convert tags in body
|
63 |
$this->message = $this->convert_tags( $this->message );
|
64 |
|
65 |
+
// Send mail
|
66 |
+
add_filter( 'wp_mail_content_type', array(&$this, 'set_content_type') );
|
67 |
wp_mail( $email, $this->subject, $this->message, $this->headers, $this->attachments );
|
68 |
+
remove_filter( 'wp_mail_content_type', array(&$this, 'set_content_type') );
|
69 |
+
|
70 |
+
}
|
71 |
+
|
72 |
+
/***
|
73 |
+
*** @maybe sending HTML emails
|
74 |
+
***/
|
75 |
+
function set_content_type( $content_type ) {
|
76 |
+
if ( um_get_option('email_html') )
|
77 |
+
return 'text/html';
|
78 |
+
return 'text/plain';
|
79 |
}
|
80 |
|
81 |
/***
|
98 |
'{admin_email}',
|
99 |
'{user_profile_link}',
|
100 |
'{submitted_registration}',
|
101 |
+
'{user_avatar_url}',
|
102 |
);
|
103 |
|
104 |
$search = apply_filters('um_template_tags_patterns_hook', $search);
|
118 |
um_admin_email(),
|
119 |
um_user_profile_url(),
|
120 |
um_user_submitted_registration(),
|
121 |
+
um_get_user_avatar_url(),
|
122 |
);
|
123 |
|
124 |
$replace = apply_filters('um_template_tags_replaces_hook', $replace);
|
core/um-short-functions.php
CHANGED
@@ -852,6 +852,18 @@ function um_fetch_user( $user_id ) {
|
|
852 |
return $uri;
|
853 |
}
|
854 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
855 |
/***
|
856 |
*** @default cover
|
857 |
***/
|
852 |
return $uri;
|
853 |
}
|
854 |
|
855 |
+
/***
|
856 |
+
*** @get user avatar url
|
857 |
+
***/
|
858 |
+
function um_get_user_avatar_url() {
|
859 |
+
if ( um_profile('profile_photo') ) {
|
860 |
+
$avatar_uri = um_get_avatar_uri( um_profile('profile_photo'), $attrs );
|
861 |
+
} else {
|
862 |
+
$avatar_uri = um_get_default_avatar_uri();
|
863 |
+
}
|
864 |
+
return $avatar_uri;
|
865 |
+
}
|
866 |
+
|
867 |
/***
|
868 |
*** @default cover
|
869 |
***/
|
index.php
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
/*
|
3 |
Plugin Name: Ultimate Member
|
4 |
Plugin URI: http://ultimatemember.com/
|
5 |
-
Description:
|
6 |
-
Version: 1.0.
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
*/
|
2 |
/*
|
3 |
Plugin Name: Ultimate Member
|
4 |
Plugin URI: http://ultimatemember.com/
|
5 |
+
Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress
|
6 |
+
Version: 1.0.66
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
*/
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Tags: access control, author, authors, author profile, comments, community, comm
|
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 4.1.1
|
9 |
|
10 |
-
Stable Tag: 1.0.
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
@@ -189,6 +189,11 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
|
189 |
|
190 |
== Changelog ==
|
191 |
|
|
|
|
|
|
|
|
|
|
|
192 |
= 1.0.65: February 24, 2015 =
|
193 |
|
194 |
* New: added option to customize register form secondary button URL
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 4.1.1
|
9 |
|
10 |
+
Stable Tag: 1.0.66
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
189 |
|
190 |
== Changelog ==
|
191 |
|
192 |
+
= 1.0.66: February 25, 2015 =
|
193 |
+
|
194 |
+
* New: added option to send e-mails as HTML
|
195 |
+
* New: added default HTML templates for e-mail notifications
|
196 |
+
|
197 |
= 1.0.65: February 24, 2015 =
|
198 |
|
199 |
* New: added option to customize register form secondary button URL
|
templates/email/approval_email.html
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div style="font-size: 13px;margin-bottom: 20px;">Thank you for signing up with {site_name}! Your account has been approved and is now active.</div>
|
2 |
+
|
3 |
+
<div style="font-size: 13px;margin-bottom: 4px;">To login please visit the following url:</div>
|
4 |
+
|
5 |
+
<div style="font-size: 13px;margin-bottom: 20px;">{login_url}</div>
|
6 |
+
|
7 |
+
<div style="font-size: 13px;margin-bottom: 4px;"><b>Your account e-mail</b>: {email}</div>
|
8 |
+
<div style="font-size: 13px;margin-bottom: 4px;"><b>Your account username</b>: {username}</div>
|
9 |
+
<div style="font-size: 13px;margin-bottom: 20px;"><b>Your account password</b>: {password}</div>
|
templates/email/changedpw_email.html
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<div style="font-size: 13px;margin-bottom: 20px;">You recently changed the password associated with your {site_name} account.</div>
|
2 |
+
|
3 |
+
<div style="font-size: 13px;margin-bottom: 20px;">If you did not make this change and believe your {site_name} account has been compromised, please contact us immediately.</div>
|
templates/email/checkmail_email.html
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<div style="font-size: 13px;margin-bottom: 20px;">Thank you for signing up with {site_name}! To activate your account, please click the link below to confirm your email address:</div>
|
2 |
+
|
3 |
+
<div style="font-size: 13px;margin-bottom: 20px;">{account_activation_link}</div>
|
templates/email/deletion_email.html
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<div style="font-size: 13px;margin-bottom: 20px;">This is an automated email to let you know your {site_name} account has been deleted. All of your personal information has been permanently deleted and you will no longer be able to login to {site_name}.</div>
|
2 |
+
|
3 |
+
<div style="font-size: 13px;margin-bottom: 20px;">If your account has been deleted by accident please contact us immediately.</div>
|
templates/email/footer.html
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div style="font-size: 13px;margin-bottom: 20px;">If you have any problems, please contact us at {admin_email}</div>
|
2 |
+
|
3 |
+
<div style="font-size: 13px;margin-bottom: 4px;">Thanks,</div>
|
4 |
+
<div style="font-size: 13px;margin-bottom: 4px;">{site_name}</div>
|
5 |
+
|
6 |
+
</div>
|
7 |
+
|
8 |
+
</div>
|
9 |
+
|
10 |
+
</body>
|
11 |
+
</html>
|
templates/email/header.html
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html>
|
2 |
+
<body>
|
3 |
+
|
4 |
+
<div style="max-width: 600px;margin:20px auto;font-family: Arial;">
|
5 |
+
|
6 |
+
<div style="background: #3ba1da;padding: 0 20px;color: #fff;font-size: 16px;font-weight: normal;border-radius: 5px 5px 0 0;">
|
7 |
+
<div style="float:left;padding: 15px 0;">{site_name}</div>
|
8 |
+
<div style="float:right;padding: 7px 0 0 0;"><a href="{user_profile_link}"><img src="{user_avatar_url}" width="32" height="32" alt="" style="border-radius: 3px;border: 2px solid #fff;background: #fff;" /></a></div>
|
9 |
+
<div style="clear:both"></div>
|
10 |
+
</div>
|
11 |
+
|
12 |
+
<div style="padding: 20px;border: 1px solid #ccc;border-top: 0;border-radius: 0 0 5px 5px;color: #444;">
|
templates/email/inactive_email.html
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<div style="font-size: 13px;margin-bottom: 20px;">This is an automated email to let you know your {site_name} account has been deactivated.</div>
|
2 |
+
|
3 |
+
<div style="font-size: 13px;margin-bottom: 20px;">If you would like your account to be re-activated please contact us again at our e-mail.</div>
|
templates/email/pending_email.html
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<div style="font-size: 13px;margin-bottom: 20px;">Thank you for signing up with {site_name}! Your account is currently being reviewed by a member of our team.</div>
|
2 |
+
|
3 |
+
<div style="font-size: 13px;margin-bottom: 20px;">Please allow us some time to process your request.</div>
|
templates/email/rejected_email.html
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<div style="font-size: 13px;margin-bottom: 20px;">Thank you for applying for membership to {site_name}! We have reviewed your information and unfortunately we are unable to accept you as a member at this moment.</div>
|
2 |
+
|
3 |
+
<div style="font-size: 13px;margin-bottom: 20px;">Please feel free to apply again at a future date.</div>
|
templates/email/resetpw_email.html
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div style="font-size: 13px;margin-bottom: 20px;">We received a request to reset the password for your account. If you made this request, click the link below to change your password:</div>
|
2 |
+
|
3 |
+
<div style="font-size: 13px;margin-bottom: 20px;">{password_reset_link}</div>
|
4 |
+
|
5 |
+
<div style="font-size: 13px;margin-bottom: 20px;">If you didn't make this request, you can ignore this email</div>
|
templates/email/welcome_email.html
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div style="font-size: 13px;margin-bottom: 20px;">Thank you for signing up with {site_name}! Your account is now active.</div>
|
2 |
+
|
3 |
+
<div style="font-size: 13px;margin-bottom: 4px;">To login please visit the following url:</div>
|
4 |
+
|
5 |
+
<div style="font-size: 13px;margin-bottom: 20px;">{login_url}</div>
|
6 |
+
|
7 |
+
<div style="font-size: 13px;margin-bottom: 4px;"><b>Your account e-mail</b>: {email}</div>
|
8 |
+
<div style="font-size: 13px;margin-bottom: 4px;"><b>Your account username</b>: {username}</div>
|
9 |
+
<div style="font-size: 13px;margin-bottom: 20px;"><b>Your account password</b>: {password}</div>
|
um-config.php
CHANGED
@@ -392,6 +392,14 @@ $this->sections[] = array(
|
|
392 |
'default' => get_bloginfo('admin_email'),
|
393 |
),
|
394 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
array(
|
396 |
'id' => 'welcome_email_on',
|
397 |
'type' => 'switch',
|
392 |
'default' => get_bloginfo('admin_email'),
|
393 |
),
|
394 |
|
395 |
+
array(
|
396 |
+
'id' => 'email_html',
|
397 |
+
'type' => 'switch',
|
398 |
+
'title' => __( 'Use HTML for E-mails?','ultimatemember' ),
|
399 |
+
'default' => 0,
|
400 |
+
'desc' => __('If you enable HTML for e-mails, you can customize the HTML e-mail templates found in <strong>templates/email</strong> folder.','ultimatemember'),
|
401 |
+
),
|
402 |
+
|
403 |
array(
|
404 |
'id' => 'welcome_email_on',
|
405 |
'type' => 'switch',
|