Version Description
Download this release
Release Info
Developer | ultimatemember |
Plugin | Ultimate Member – User Profile & Membership Plugin |
Version | 1.0.95 |
Comparing to | |
See all releases |
Code changes from version 1.0.94 to 1.0.95
- admin/core/um-admin-access.php +2 -0
- admin/templates/extensions.php +7 -0
- core/um-fields.php +1 -1
- core/um-mail.php +24 -10
- index.php +1 -1
- readme.txt +8 -1
admin/core/um-admin-access.php
CHANGED
@@ -90,6 +90,8 @@ class UM_Admin_Access {
|
|
90 |
function add_metabox_form() {
|
91 |
global $ultimatemember;
|
92 |
|
|
|
|
|
93 |
$types = $ultimatemember->query->get_post_types;
|
94 |
foreach($types as $post_type) {
|
95 |
|
90 |
function add_metabox_form() {
|
91 |
global $ultimatemember;
|
92 |
|
93 |
+
if ( !current_user_can('manage_options') ) return;
|
94 |
+
|
95 |
$types = $ultimatemember->query->get_post_types;
|
96 |
foreach($types as $post_type) {
|
97 |
|
admin/templates/extensions.php
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
$premium['social-login'] = array(
|
4 |
'url' => 'https://ultimatemember.com/extensions/social-login/',
|
5 |
'image' => 'https://ultimatemember.com/wp-content/uploads/2015/02/sociallogin.png',
|
1 |
<?php
|
2 |
|
3 |
+
$premium['user-reviews'] = array(
|
4 |
+
'url' => 'https://ultimatemember.com/extensions/user-reviews/',
|
5 |
+
'image' => 'https://ultimatemember.com/wp-content/uploads/2015/03/userrating800x300.png',
|
6 |
+
'name' => 'User Reviews',
|
7 |
+
'desc' => 'With our user reviews extension, you can add a 5 star user rating and review system to your site so users can rate/review each other.',
|
8 |
+
);
|
9 |
+
|
10 |
$premium['social-login'] = array(
|
11 |
'url' => 'https://ultimatemember.com/extensions/social-login/',
|
12 |
'image' => 'https://ultimatemember.com/wp-content/uploads/2015/02/sociallogin.png',
|
core/um-fields.php
CHANGED
@@ -253,7 +253,7 @@ class UM_Fields {
|
|
253 |
$output = '';
|
254 |
}
|
255 |
|
256 |
-
if (
|
257 |
$output = '<div class="um-field-error"><span class="um-field-arrow"><i class="um-faicon-caret-up"></i></span>'.$text.'</div>';
|
258 |
}
|
259 |
return $output;
|
253 |
$output = '';
|
254 |
}
|
255 |
|
256 |
+
if ( !$ultimatemember->form->processing ) {
|
257 |
$output = '<div class="um-field-error"><span class="um-field-arrow"><i class="um-faicon-caret-up"></i></span>'.$text.'</div>';
|
258 |
}
|
259 |
return $output;
|
core/um-mail.php
CHANGED
@@ -27,14 +27,23 @@ class UM_Mail {
|
|
27 |
/***
|
28 |
*** @check If template exists
|
29 |
***/
|
30 |
-
function email_template( $template ) {
|
31 |
if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/email/' . $template . '.html' ) ) {
|
32 |
return get_stylesheet_directory() . '/ultimate-member/templates/email/' . $template . '.html';
|
33 |
}
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
36 |
}
|
|
|
|
|
|
|
|
|
|
|
37 |
return false;
|
|
|
38 |
}
|
39 |
|
40 |
/***
|
@@ -50,21 +59,21 @@ class UM_Mail {
|
|
50 |
$this->headers = 'From: '. um_get_option('mail_from') .' <'. um_get_option('mail_from_addr') .'>' . "\r\n";
|
51 |
|
52 |
$this->subject = um_get_option( $template . '_sub' );
|
53 |
-
$this->subject = $this->convert_tags( $this->subject );
|
54 |
|
55 |
-
if ( isset( $args['admin'] ) ) {
|
56 |
$this->force_plain_text = 'forced';
|
57 |
}
|
58 |
|
59 |
-
// HTML e-mail
|
60 |
-
if ( um_get_option('email_html') && $this->email_template( $template ) ) {
|
61 |
-
$this->message = file_get_contents( $this->email_template( $template ) );
|
62 |
} else {
|
63 |
$this->message = um_get_option( $template );
|
64 |
}
|
65 |
|
66 |
// Convert tags in body
|
67 |
-
$this->message = $this->convert_tags( $this->message );
|
68 |
|
69 |
// Send mail
|
70 |
add_filter( 'wp_mail_content_type', array(&$this, 'set_content_type') );
|
@@ -92,7 +101,7 @@ class UM_Mail {
|
|
92 |
/***
|
93 |
*** @convert template tags in email template
|
94 |
***/
|
95 |
-
function convert_tags( $content ) {
|
96 |
|
97 |
$search = array(
|
98 |
'{display_name}',
|
@@ -139,6 +148,11 @@ class UM_Mail {
|
|
139 |
$replace = apply_filters('um_template_tags_replaces_hook', $replace);
|
140 |
|
141 |
$content = str_replace($search, $replace, $content);
|
|
|
|
|
|
|
|
|
|
|
142 |
return $content;
|
143 |
|
144 |
}
|
27 |
/***
|
28 |
*** @check If template exists
|
29 |
***/
|
30 |
+
function email_template( $template, $args = array() ) {
|
31 |
if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/email/' . $template . '.html' ) ) {
|
32 |
return get_stylesheet_directory() . '/ultimate-member/templates/email/' . $template . '.html';
|
33 |
}
|
34 |
+
|
35 |
+
if ( isset( $args['path'] ) ) {
|
36 |
+
$path = $args['path'];
|
37 |
+
} else {
|
38 |
+
$path = um_url . 'templates/email/';
|
39 |
}
|
40 |
+
|
41 |
+
if ( file_exists( $path . $template . '.html' ) ) {
|
42 |
+
return $path . $template . '.html';
|
43 |
+
}
|
44 |
+
|
45 |
return false;
|
46 |
+
|
47 |
}
|
48 |
|
49 |
/***
|
59 |
$this->headers = 'From: '. um_get_option('mail_from') .' <'. um_get_option('mail_from_addr') .'>' . "\r\n";
|
60 |
|
61 |
$this->subject = um_get_option( $template . '_sub' );
|
62 |
+
$this->subject = $this->convert_tags( $this->subject, $args );
|
63 |
|
64 |
+
if ( isset( $args['admin'] ) || isset( $args['plain_text'] ) ) {
|
65 |
$this->force_plain_text = 'forced';
|
66 |
}
|
67 |
|
68 |
+
// HTML e-mail or text
|
69 |
+
if ( um_get_option('email_html') && $this->email_template( $template, $args ) ) {
|
70 |
+
$this->message = file_get_contents( $this->email_template( $template, $args ) );
|
71 |
} else {
|
72 |
$this->message = um_get_option( $template );
|
73 |
}
|
74 |
|
75 |
// Convert tags in body
|
76 |
+
$this->message = $this->convert_tags( $this->message, $args );
|
77 |
|
78 |
// Send mail
|
79 |
add_filter( 'wp_mail_content_type', array(&$this, 'set_content_type') );
|
101 |
/***
|
102 |
*** @convert template tags in email template
|
103 |
***/
|
104 |
+
function convert_tags( $content, $args = array() ) {
|
105 |
|
106 |
$search = array(
|
107 |
'{display_name}',
|
148 |
$replace = apply_filters('um_template_tags_replaces_hook', $replace);
|
149 |
|
150 |
$content = str_replace($search, $replace, $content);
|
151 |
+
|
152 |
+
if ( isset( $args['tags'] ) && isset( $args['tags_replace'] ) ) {
|
153 |
+
$content = str_replace($args['tags'], $args['tags_replace'], $content);
|
154 |
+
}
|
155 |
+
|
156 |
return $content;
|
157 |
|
158 |
}
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.
|
7 |
Author: Ultimate Member
|
8 |
Author URI: http://ultimatemember.com/
|
9 |
*/
|
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.95
|
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 |
|
@@ -49,6 +49,7 @@ You can extend the power of Ultimate Member with one of our premium extensions:
|
|
49 |
* [Social Login](https://ultimatemember.com/extensions/social-login/)
|
50 |
* [bbPress](https://ultimatemember.com/extensions/bbpress/)
|
51 |
* [MailChimp](https://ultimatemember.com/extensions/mailchimp/)
|
|
|
52 |
* [myCRED](https://ultimatemember.com/extensions/mycred/)
|
53 |
* [Notices](https://ultimatemember.com/extensions/notices/)
|
54 |
|
@@ -203,6 +204,12 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
|
203 |
|
204 |
== Changelog ==
|
205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
= 1.0.94: March 23, 2015 =
|
207 |
|
208 |
* Fixed: bug with member directory search
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 4.1.1
|
9 |
|
10 |
+
Stable Tag: 1.0.95
|
11 |
|
12 |
License: GNU Version 2 or Any Later Version
|
13 |
|
49 |
* [Social Login](https://ultimatemember.com/extensions/social-login/)
|
50 |
* [bbPress](https://ultimatemember.com/extensions/bbpress/)
|
51 |
* [MailChimp](https://ultimatemember.com/extensions/mailchimp/)
|
52 |
+
* [User Reviews](https://ultimatemember.com/extensions/user-reviews/)
|
53 |
* [myCRED](https://ultimatemember.com/extensions/mycred/)
|
54 |
* [Notices](https://ultimatemember.com/extensions/notices/)
|
55 |
|
204 |
|
205 |
== Changelog ==
|
206 |
|
207 |
+
= 1.0.95: March 24, 2015 =
|
208 |
+
|
209 |
+
* Tweak: added more hooks to mail function to allow for sending custom e-mails
|
210 |
+
* Fixed: issue with content lock settings in backend appearing for non-admins
|
211 |
+
* Fixed: issue with form errors handling
|
212 |
+
|
213 |
= 1.0.94: March 23, 2015 =
|
214 |
|
215 |
* Fixed: bug with member directory search
|