Version Description
Download this release
Release Info
| Developer | nsinelnikov |
| Plugin | |
| Version | 2.0.45 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.44 to 2.0.45
- includes/admin/core/class-admin-enqueue.php +7 -4
- includes/core/class-gdpr.php +3 -2
- includes/core/class-user.php +10 -8
- includes/core/class-validation.php +70 -0
- includes/core/um-actions-profile.php +42 -6
- includes/core/um-actions-register.php +6 -5
- includes/core/um-filters-fields.php +1 -1
- includes/um-short-functions.php +2 -2
- languages/ultimate-member-en_US.mo +0 -0
- languages/ultimate-member-en_US.po +23 -23
- readme.txt +7 -1
- ultimate-member.php +1 -1
includes/admin/core/class-admin-enqueue.php
CHANGED
|
@@ -477,7 +477,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
|
| 477 |
return;
|
| 478 |
}
|
| 479 |
|
| 480 |
-
wp_register_script( 'um-blocks-shortcode-js', $this->js_url . 'um-admin-blocks-shortcode.js', array( 'wp-i18n', 'wp-blocks', 'wp-components' ), ultimatemember_version, true );
|
| 481 |
wp_set_script_translations( 'um-blocks-shortcode-js', 'ultimate-member' );
|
| 482 |
wp_enqueue_script( 'um-blocks-shortcode-js' );
|
| 483 |
|
|
@@ -643,10 +643,13 @@ if ( ! class_exists( 'um\admin\core\Admin_Enqueue' ) ) {
|
|
| 643 |
|
| 644 |
}
|
| 645 |
|
| 646 |
-
global $wp_version;
|
| 647 |
if ( version_compare( $wp_version, '5.0', '>=' ) && ! empty( $this->post_page ) ) {
|
| 648 |
-
|
| 649 |
-
$
|
|
|
|
|
|
|
|
|
|
| 650 |
}
|
| 651 |
|
| 652 |
}
|
| 477 |
return;
|
| 478 |
}
|
| 479 |
|
| 480 |
+
wp_register_script( 'um-blocks-shortcode-js', $this->js_url . 'um-admin-blocks-shortcode.js', array( 'wp-i18n', 'wp-blocks', 'wp-components', /*'rich-text'*/ ), ultimatemember_version, true );
|
| 481 |
wp_set_script_translations( 'um-blocks-shortcode-js', 'ultimate-member' );
|
| 482 |
wp_enqueue_script( 'um-blocks-shortcode-js' );
|
| 483 |
|
| 643 |
|
| 644 |
}
|
| 645 |
|
| 646 |
+
global $wp_version, $current_screen;
|
| 647 |
if ( version_compare( $wp_version, '5.0', '>=' ) && ! empty( $this->post_page ) ) {
|
| 648 |
+
|
| 649 |
+
if ( $current_screen->is_block_editor() ) {
|
| 650 |
+
$this->load_gutenberg_js();
|
| 651 |
+
$this->load_gutenberg_shortcode_blocks();
|
| 652 |
+
}
|
| 653 |
}
|
| 654 |
|
| 655 |
}
|
includes/core/class-gdpr.php
CHANGED
|
@@ -21,7 +21,7 @@ if ( ! class_exists( 'um\core\GDPR' ) ) {
|
|
| 21 |
function __construct() {
|
| 22 |
add_action( 'um_submit_form_register', array( &$this, 'agreement_validation' ), 9 );
|
| 23 |
|
| 24 |
-
add_filter( 'um_before_save_filter_submitted', array( &$this, 'add_agreement_date' ), 10,
|
| 25 |
add_filter( 'um_email_registration_data', array( &$this, 'email_registration_data' ), 10, 1 );
|
| 26 |
|
| 27 |
add_action( 'um_after_form_fields', array( &$this, 'display_option' ) );
|
|
@@ -52,10 +52,11 @@ if ( ! class_exists( 'um\core\GDPR' ) ) {
|
|
| 52 |
|
| 53 |
/**
|
| 54 |
* @param $submitted
|
|
|
|
| 55 |
*
|
| 56 |
* @return mixed
|
| 57 |
*/
|
| 58 |
-
function add_agreement_date( $submitted ) {
|
| 59 |
if ( isset( $submitted['use_gdpr_agreement'] ) ) {
|
| 60 |
$submitted['use_gdpr_agreement'] = time();
|
| 61 |
}
|
| 21 |
function __construct() {
|
| 22 |
add_action( 'um_submit_form_register', array( &$this, 'agreement_validation' ), 9 );
|
| 23 |
|
| 24 |
+
add_filter( 'um_before_save_filter_submitted', array( &$this, 'add_agreement_date' ), 10, 2 );
|
| 25 |
add_filter( 'um_email_registration_data', array( &$this, 'email_registration_data' ), 10, 1 );
|
| 26 |
|
| 27 |
add_action( 'um_after_form_fields', array( &$this, 'display_option' ) );
|
| 52 |
|
| 53 |
/**
|
| 54 |
* @param $submitted
|
| 55 |
+
* @param $args
|
| 56 |
*
|
| 57 |
* @return mixed
|
| 58 |
*/
|
| 59 |
+
function add_agreement_date( $submitted, $args ) {
|
| 60 |
if ( isset( $submitted['use_gdpr_agreement'] ) ) {
|
| 61 |
$submitted['use_gdpr_agreement'] = time();
|
| 62 |
}
|
includes/core/class-user.php
CHANGED
|
@@ -954,9 +954,10 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
|
| 954 |
/**
|
| 955 |
* Set user's registration details
|
| 956 |
*
|
| 957 |
-
* @param $submitted
|
|
|
|
| 958 |
*/
|
| 959 |
-
function set_registration_details( $submitted ) {
|
| 960 |
|
| 961 |
if ( isset( $submitted['user_pass'] ) ) {
|
| 962 |
unset( $submitted['user_pass'] );
|
|
@@ -991,21 +992,22 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
|
| 991 |
* @title um_before_save_filter_submitted
|
| 992 |
* @description Change submitted data before save usermeta "submitted" on registration process
|
| 993 |
* @input_vars
|
| 994 |
-
* [{"var":"$submitted","type":"array","desc":"Submitted data"}
|
|
|
|
| 995 |
* @change_log
|
| 996 |
* ["Since: 2.0"]
|
| 997 |
* @usage
|
| 998 |
-
* <?php add_filter( 'um_before_save_filter_submitted', 'function_name', 10,
|
| 999 |
* @example
|
| 1000 |
* <?php
|
| 1001 |
-
* add_filter( 'um_before_save_filter_submitted', 'my_before_save_filter_submitted', 10,
|
| 1002 |
-
* function my_before_save_filter_submitted( $submitted ) {
|
| 1003 |
* // your code here
|
| 1004 |
* return $submitted;
|
| 1005 |
* }
|
| 1006 |
* ?>
|
| 1007 |
*/
|
| 1008 |
-
$submitted = apply_filters( 'um_before_save_filter_submitted', $submitted );
|
| 1009 |
|
| 1010 |
/**
|
| 1011 |
* UM hook
|
|
@@ -1672,7 +1674,7 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
|
| 1672 |
|
| 1673 |
foreach ( $changes as $key => $value ) {
|
| 1674 |
if ( ! in_array( $key, $this->update_user_keys ) ) {
|
| 1675 |
-
if( $value === 0 ){
|
| 1676 |
update_user_meta( $this->id, $key, '0' );
|
| 1677 |
} else {
|
| 1678 |
update_user_meta( $this->id, $key, $value );
|
| 954 |
/**
|
| 955 |
* Set user's registration details
|
| 956 |
*
|
| 957 |
+
* @param array $submitted
|
| 958 |
+
* @param array $args
|
| 959 |
*/
|
| 960 |
+
function set_registration_details( $submitted, $args ) {
|
| 961 |
|
| 962 |
if ( isset( $submitted['user_pass'] ) ) {
|
| 963 |
unset( $submitted['user_pass'] );
|
| 992 |
* @title um_before_save_filter_submitted
|
| 993 |
* @description Change submitted data before save usermeta "submitted" on registration process
|
| 994 |
* @input_vars
|
| 995 |
+
* [{"var":"$submitted","type":"array","desc":"Submitted data"},
|
| 996 |
+
* {"var":"$args","type":"array","desc":"Form Args"}]
|
| 997 |
* @change_log
|
| 998 |
* ["Since: 2.0"]
|
| 999 |
* @usage
|
| 1000 |
+
* <?php add_filter( 'um_before_save_filter_submitted', 'function_name', 10, 2 ); ?>
|
| 1001 |
* @example
|
| 1002 |
* <?php
|
| 1003 |
+
* add_filter( 'um_before_save_filter_submitted', 'my_before_save_filter_submitted', 10, 2 );
|
| 1004 |
+
* function my_before_save_filter_submitted( $submitted, $args ) {
|
| 1005 |
* // your code here
|
| 1006 |
* return $submitted;
|
| 1007 |
* }
|
| 1008 |
* ?>
|
| 1009 |
*/
|
| 1010 |
+
$submitted = apply_filters( 'um_before_save_filter_submitted', $submitted, $args );
|
| 1011 |
|
| 1012 |
/**
|
| 1013 |
* UM hook
|
| 1674 |
|
| 1675 |
foreach ( $changes as $key => $value ) {
|
| 1676 |
if ( ! in_array( $key, $this->update_user_keys ) ) {
|
| 1677 |
+
if ( $value === 0 ) {
|
| 1678 |
update_user_meta( $this->id, $key, '0' );
|
| 1679 |
} else {
|
| 1680 |
update_user_meta( $this->id, $key, $value );
|
includes/core/class-validation.php
CHANGED
|
@@ -20,6 +20,76 @@ if ( ! class_exists( 'um\core\Validation' ) ) {
|
|
| 20 |
function __construct() {
|
| 21 |
$this->regex_safe = '/\A[\w\-\.]+\z/';
|
| 22 |
$this->regex_phone_number = '/\A[\d\-\.\+\(\)\ ]+\z/';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
|
| 20 |
function __construct() {
|
| 21 |
$this->regex_safe = '/\A[\w\-\.]+\z/';
|
| 22 |
$this->regex_phone_number = '/\A[\d\-\.\+\(\)\ ]+\z/';
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
add_filter( 'um_user_pre_updating_files_array', array( $this, 'validate_files' ), 10, 1 );
|
| 26 |
+
add_filter( 'um_before_save_filter_submitted', array( $this, 'validate_fields_values' ), 10, 2 );
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
/**
|
| 31 |
+
* Validate files before upload
|
| 32 |
+
*
|
| 33 |
+
* @param $files
|
| 34 |
+
*
|
| 35 |
+
* @return mixed
|
| 36 |
+
*/
|
| 37 |
+
function validate_files( $files ) {
|
| 38 |
+
if ( ! empty( $files ) ) {
|
| 39 |
+
foreach ( $files as $key => $filename ) {
|
| 40 |
+
if ( validate_file( $filename ) !== 0 ) {
|
| 41 |
+
unset( $files[ $key ] );
|
| 42 |
+
}
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
return $files;
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
function validate_fields_values( $changes, $args ) {
|
| 52 |
+
$fields = array();
|
| 53 |
+
if ( ! empty( $args['custom_fields'] ) ) {
|
| 54 |
+
$fields = unserialize( $args['custom_fields'] );
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
foreach ( $changes as $key => $value ) {
|
| 58 |
+
//rating field validation
|
| 59 |
+
if ( isset( $fields[ $key ]['type'] ) && $fields[ $key ]['type'] == 'rating' ) {
|
| 60 |
+
if ( ! is_numeric( $value ) ) {
|
| 61 |
+
unset( $changes[ $key ] );
|
| 62 |
+
} else {
|
| 63 |
+
if ( $fields[ $key ]['number'] == 5 ) {
|
| 64 |
+
if ( ! in_array( $value, range( 1, 5 ) ) ) {
|
| 65 |
+
unset( $changes[ $key ] );
|
| 66 |
+
}
|
| 67 |
+
} elseif ( $fields[ $key ]['number'] == 10 ) {
|
| 68 |
+
if ( ! in_array( $value, range( 1, 10 ) ) ) {
|
| 69 |
+
unset( $changes[ $key ] );
|
| 70 |
+
}
|
| 71 |
+
}
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
//validation of correct values from options in wp-admin
|
| 76 |
+
if ( in_array( $fields[ $key ]['type'], array( 'select', 'radio' ) ) &&
|
| 77 |
+
isset( $value ) && ! empty( $fields[ $key ]['options'] ) &&
|
| 78 |
+
! in_array( $value, $fields[ $key ]['options'] ) ) {
|
| 79 |
+
unset( $changes[ $key ] );
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
//validation of correct values from options in wp-admin
|
| 83 |
+
//the user cannot set invalid value in the hidden input at the page
|
| 84 |
+
if ( in_array( $fields[ $key ]['type'], array( 'multiselect', 'checkbox' ) ) &&
|
| 85 |
+
isset( $value ) && ! empty( $fields[ $key ]['options'] ) ) {
|
| 86 |
+
|
| 87 |
+
$changes[ $key ] = array_intersect( $value, $fields[ $key ]['options'] );
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
return $changes;
|
| 93 |
}
|
| 94 |
|
| 95 |
|
includes/core/um-actions-profile.php
CHANGED
|
@@ -179,14 +179,17 @@ function um_user_edit_profile( $args ) {
|
|
| 179 |
$to_update = null;
|
| 180 |
$files = array();
|
| 181 |
|
|
|
|
| 182 |
if ( isset( $args['user_id'] ) ) {
|
| 183 |
-
|
| 184 |
-
UM()->user()->set( $args['user_id'] );
|
| 185 |
-
} else {
|
| 186 |
-
wp_die( __( 'You are not allowed to edit this user.', 'ultimate-member' ) );
|
| 187 |
-
}
|
| 188 |
} elseif ( isset( $args['_user_id'] ) ) {
|
| 189 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
}
|
| 191 |
|
| 192 |
$userinfo = UM()->user()->profile;
|
|
@@ -225,6 +228,39 @@ function um_user_edit_profile( $args ) {
|
|
| 225 |
continue;
|
| 226 |
}
|
| 227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
if ( $array['type'] == 'multiselect' || $array['type'] == 'checkbox' && ! isset( $args['submitted'][ $key ] ) ) {
|
| 229 |
delete_user_meta( um_user( 'ID' ), $key );
|
| 230 |
}
|
| 179 |
$to_update = null;
|
| 180 |
$files = array();
|
| 181 |
|
| 182 |
+
$user_id = null;
|
| 183 |
if ( isset( $args['user_id'] ) ) {
|
| 184 |
+
$user_id = $args['user_id'];
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
} elseif ( isset( $args['_user_id'] ) ) {
|
| 186 |
+
$user_id = $args['_user_id'];
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
if ( UM()->roles()->um_current_user_can( 'edit', $user_id ) ) {
|
| 190 |
+
UM()->user()->set( $user_id );
|
| 191 |
+
} else {
|
| 192 |
+
wp_die( __( 'You are not allowed to edit this user.', 'ultimate-member' ) );
|
| 193 |
}
|
| 194 |
|
| 195 |
$userinfo = UM()->user()->profile;
|
| 228 |
continue;
|
| 229 |
}
|
| 230 |
|
| 231 |
+
//the same code in class-validation.php validate_fields_values for registration form
|
| 232 |
+
//rating field validation
|
| 233 |
+
if ( $array['type'] == 'rating' && isset( $args['submitted'][ $key ] ) ) {
|
| 234 |
+
if ( ! is_numeric( $args['submitted'][ $key ] ) ) {
|
| 235 |
+
continue;
|
| 236 |
+
} else {
|
| 237 |
+
if ( $array['number'] == 5 ) {
|
| 238 |
+
if ( ! in_array( $args['submitted'][ $key ], range( 1, 5 ) ) ) {
|
| 239 |
+
continue;
|
| 240 |
+
}
|
| 241 |
+
} elseif ( $array['number'] == 10 ) {
|
| 242 |
+
if ( ! in_array( $args['submitted'][ $key ], range( 1, 10 ) ) ) {
|
| 243 |
+
continue;
|
| 244 |
+
}
|
| 245 |
+
}
|
| 246 |
+
}
|
| 247 |
+
}
|
| 248 |
+
|
| 249 |
+
//validation of correct values from options in wp-admin
|
| 250 |
+
if ( in_array( $array['type'], array( 'select', 'radio' ) ) &&
|
| 251 |
+
isset( $args['submitted'][ $key ] ) && ! empty( $array['options'] ) &&
|
| 252 |
+
! in_array( $args['submitted'][ $key ], $array['options'] ) ) {
|
| 253 |
+
continue;
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
//validation of correct values from options in wp-admin
|
| 257 |
+
//the user cannot set invalid value in the hidden input at the page
|
| 258 |
+
if ( in_array( $array['type'], array( 'multiselect', 'checkbox' ) ) &&
|
| 259 |
+
isset( $args['submitted'][ $key ] ) && ! empty( $array['options'] ) ) {
|
| 260 |
+
|
| 261 |
+
$args['submitted'][ $key ] = array_intersect( $args['submitted'][ $key ], $array['options'] );
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
if ( $array['type'] == 'multiselect' || $array['type'] == 'checkbox' && ! isset( $args['submitted'][ $key ] ) ) {
|
| 265 |
delete_user_meta( um_user( 'ID' ), $key );
|
| 266 |
}
|
includes/core/um-actions-register.php
CHANGED
|
@@ -56,7 +56,7 @@ function um_after_insert_user( $user_id, $args ) {
|
|
| 56 |
|
| 57 |
um_fetch_user( $user_id );
|
| 58 |
if ( ! empty( $args['submitted'] ) ) {
|
| 59 |
-
UM()->user()->set_registration_details( $args['submitted'] );
|
| 60 |
}
|
| 61 |
UM()->user()->set_status( um_user( 'status' ) );
|
| 62 |
|
|
@@ -589,8 +589,9 @@ add_action( 'um_main_register_fields', 'um_add_register_fields', 100 );
|
|
| 589 |
*/
|
| 590 |
function um_registration_save_files( $user_id, $args ) {
|
| 591 |
|
| 592 |
-
if ( empty( $args['custom_fields'] ) )
|
| 593 |
return;
|
|
|
|
| 594 |
|
| 595 |
$files = array();
|
| 596 |
|
|
@@ -603,11 +604,11 @@ function um_registration_save_files( $user_id, $args ) {
|
|
| 603 |
|
| 604 |
if ( isset( $args['submitted'][$key] ) ) {
|
| 605 |
|
| 606 |
-
if ( isset( $fields[$key]['type'] ) && in_array( $fields[$key]['type'], array( 'image', 'file' ) ) &&
|
| 607 |
-
( um_is_temp_file( $args['submitted'][$key] ) || $args['submitted'][$key] == 'empty_file' )
|
| 608 |
) {
|
| 609 |
|
| 610 |
-
$files[$key] = $args['submitted'][$key];
|
| 611 |
|
| 612 |
}
|
| 613 |
}
|
| 56 |
|
| 57 |
um_fetch_user( $user_id );
|
| 58 |
if ( ! empty( $args['submitted'] ) ) {
|
| 59 |
+
UM()->user()->set_registration_details( $args['submitted'], $args );
|
| 60 |
}
|
| 61 |
UM()->user()->set_status( um_user( 'status' ) );
|
| 62 |
|
| 589 |
*/
|
| 590 |
function um_registration_save_files( $user_id, $args ) {
|
| 591 |
|
| 592 |
+
if ( empty( $args['custom_fields'] ) ) {
|
| 593 |
return;
|
| 594 |
+
}
|
| 595 |
|
| 596 |
$files = array();
|
| 597 |
|
| 604 |
|
| 605 |
if ( isset( $args['submitted'][$key] ) ) {
|
| 606 |
|
| 607 |
+
if ( isset( $fields[ $key ]['type'] ) && in_array( $fields[ $key ]['type'], array( 'image', 'file' ) ) &&
|
| 608 |
+
( um_is_temp_file( $args['submitted'][ $key ] ) || $args['submitted'][ $key ] == 'empty_file' )
|
| 609 |
) {
|
| 610 |
|
| 611 |
+
$files[ $key ] = $args['submitted'][ $key ];
|
| 612 |
|
| 613 |
}
|
| 614 |
}
|
includes/core/um-filters-fields.php
CHANGED
|
@@ -671,7 +671,7 @@ function um_profile_field_filter_xss_validation( $value, $data, $type = '' ) {
|
|
| 671 |
|
| 672 |
return $value;
|
| 673 |
}
|
| 674 |
-
add_filter( 'um_profile_field_filter_hook__','um_profile_field_filter_xss_validation', 10, 3 );
|
| 675 |
|
| 676 |
|
| 677 |
/**
|
| 671 |
|
| 672 |
return $value;
|
| 673 |
}
|
| 674 |
+
add_filter( 'um_profile_field_filter_hook__', 'um_profile_field_filter_xss_validation', 10, 3 );
|
| 675 |
|
| 676 |
|
| 677 |
/**
|
includes/um-short-functions.php
CHANGED
|
@@ -727,7 +727,7 @@ function um_user_submitted_registration( $style = false ) {
|
|
| 727 |
}
|
| 728 |
|
| 729 |
if ( ! empty( $filedata['original_name'] ) ) {
|
| 730 |
-
$v = '<a href="' . esc_attr( $baseurl . um_user( 'ID' ) . '/' . $file ) . '">' . $filedata['original_name'] . '</a>';
|
| 731 |
} else {
|
| 732 |
$v = $baseurl . um_user( 'ID' ) . '/' . $file;
|
| 733 |
}
|
|
@@ -824,7 +824,7 @@ function um_filtered_value( $key, $data = false ) {
|
|
| 824 |
* }
|
| 825 |
* ?>
|
| 826 |
*/
|
| 827 |
-
$value = apply_filters(
|
| 828 |
|
| 829 |
/**
|
| 830 |
* UM hook
|
| 727 |
}
|
| 728 |
|
| 729 |
if ( ! empty( $filedata['original_name'] ) ) {
|
| 730 |
+
$v = '<a href="' . esc_attr( $baseurl . um_user( 'ID' ) . '/' . $file ) . '">' . esc_html( $filedata['original_name'] ) . '</a>';
|
| 731 |
} else {
|
| 732 |
$v = $baseurl . um_user( 'ID' ) . '/' . $file;
|
| 733 |
}
|
| 824 |
* }
|
| 825 |
* ?>
|
| 826 |
*/
|
| 827 |
+
$value = apply_filters( 'um_profile_field_filter_hook__', $value, $data, $type );
|
| 828 |
|
| 829 |
/**
|
| 830 |
* UM hook
|
languages/ultimate-member-en_US.mo
CHANGED
|
Binary file
|
languages/ultimate-member-en_US.po
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
msgid ""
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: Ultimate Member\n"
|
| 4 |
-
"POT-Creation-Date: 2019-05-08
|
| 5 |
-
"PO-Revision-Date: 2019-05-08
|
| 6 |
"Last-Translator: \n"
|
| 7 |
"Language-Team: \n"
|
| 8 |
"Language: en_US\n"
|
|
@@ -268,7 +268,7 @@ msgstr ""
|
|
| 268 |
#: includes/admin/core/class-admin-forms.php:951
|
| 269 |
#: includes/admin/core/class-admin-forms.php:960
|
| 270 |
#: includes/admin/core/class-admin-notices.php:390
|
| 271 |
-
#: includes/core/um-actions-profile.php:
|
| 272 |
msgid "Remove"
|
| 273 |
msgstr ""
|
| 274 |
|
|
@@ -3615,11 +3615,11 @@ msgstr ""
|
|
| 3615 |
#: includes/admin/templates/modal/fonticons.php:11
|
| 3616 |
#: includes/admin/templates/role/publish.php:24
|
| 3617 |
#: includes/core/class-fields.php:2333 includes/core/class-fields.php:2430
|
| 3618 |
-
#: includes/core/um-actions-profile.php:
|
| 3619 |
-
#: includes/core/um-actions-profile.php:
|
| 3620 |
-
#: includes/core/um-actions-profile.php:
|
| 3621 |
-
#: includes/core/um-actions-profile.php:
|
| 3622 |
-
#: includes/core/um-actions-profile.php:
|
| 3623 |
msgid "Cancel"
|
| 3624 |
msgstr ""
|
| 3625 |
|
|
@@ -3982,7 +3982,7 @@ msgid "Members"
|
|
| 3982 |
msgstr ""
|
| 3983 |
|
| 3984 |
#: includes/class-config.php:133 includes/class-config.php:745
|
| 3985 |
-
#: includes/core/um-actions-profile.php:
|
| 3986 |
#: includes/core/um-actions-user.php:15
|
| 3987 |
msgid "Logout"
|
| 3988 |
msgstr ""
|
|
@@ -4250,7 +4250,7 @@ msgstr ""
|
|
| 4250 |
msgid "You must add a shortcode to the content area"
|
| 4251 |
msgstr ""
|
| 4252 |
|
| 4253 |
-
#: includes/core/class-builtin.php:663 includes/core/class-user.php:
|
| 4254 |
msgid "Only me"
|
| 4255 |
msgstr ""
|
| 4256 |
|
|
@@ -4399,7 +4399,7 @@ msgid "Cover Photo"
|
|
| 4399 |
msgstr ""
|
| 4400 |
|
| 4401 |
#: includes/core/class-builtin.php:1085
|
| 4402 |
-
#: includes/core/um-actions-profile.php:
|
| 4403 |
msgid "Change your cover photo"
|
| 4404 |
msgstr ""
|
| 4405 |
|
|
@@ -6369,7 +6369,7 @@ msgid "Upload Photo"
|
|
| 6369 |
msgstr ""
|
| 6370 |
|
| 6371 |
#: includes/core/class-fields.php:2308 includes/core/class-fields.php:2332
|
| 6372 |
-
#: includes/core/um-actions-profile.php:
|
| 6373 |
msgid "Change photo"
|
| 6374 |
msgstr ""
|
| 6375 |
|
|
@@ -6945,46 +6945,46 @@ msgstr ""
|
|
| 6945 |
msgid "Your membership request has been rejected."
|
| 6946 |
msgstr ""
|
| 6947 |
|
| 6948 |
-
#: includes/core/um-actions-profile.php:
|
| 6949 |
msgid "You are not allowed to edit this user."
|
| 6950 |
msgstr ""
|
| 6951 |
|
| 6952 |
-
#: includes/core/um-actions-profile.php:
|
| 6953 |
#, php-format
|
| 6954 |
msgid "Your choosed %s"
|
| 6955 |
msgstr ""
|
| 6956 |
|
| 6957 |
-
#: includes/core/um-actions-profile.php:
|
| 6958 |
msgid "Change cover photo"
|
| 6959 |
msgstr ""
|
| 6960 |
|
| 6961 |
-
#: includes/core/um-actions-profile.php:
|
| 6962 |
msgid "Upload a cover photo"
|
| 6963 |
msgstr ""
|
| 6964 |
|
| 6965 |
-
#: includes/core/um-actions-profile.php:
|
| 6966 |
msgid "Upload photo"
|
| 6967 |
msgstr ""
|
| 6968 |
|
| 6969 |
-
#: includes/core/um-actions-profile.php:
|
| 6970 |
msgid "Remove photo"
|
| 6971 |
msgstr ""
|
| 6972 |
|
| 6973 |
-
#: includes/core/um-actions-profile.php:
|
| 6974 |
msgid "Tell us a bit about yourself..."
|
| 6975 |
msgstr ""
|
| 6976 |
|
| 6977 |
-
#: includes/core/um-actions-profile.php:
|
| 6978 |
#, php-format
|
| 6979 |
msgid "This user account status is %s"
|
| 6980 |
msgstr ""
|
| 6981 |
|
| 6982 |
-
#: includes/core/um-actions-profile.php:
|
| 6983 |
-
#: includes/core/um-actions-profile.php:
|
| 6984 |
msgid "Edit Profile"
|
| 6985 |
msgstr ""
|
| 6986 |
|
| 6987 |
-
#: includes/core/um-actions-profile.php:
|
| 6988 |
msgid "My Account"
|
| 6989 |
msgstr ""
|
| 6990 |
|
| 1 |
msgid ""
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: Ultimate Member\n"
|
| 4 |
+
"POT-Creation-Date: 2019-05-08 17:47+0300\n"
|
| 5 |
+
"PO-Revision-Date: 2019-05-08 17:47+0300\n"
|
| 6 |
"Last-Translator: \n"
|
| 7 |
"Language-Team: \n"
|
| 8 |
"Language: en_US\n"
|
| 268 |
#: includes/admin/core/class-admin-forms.php:951
|
| 269 |
#: includes/admin/core/class-admin-forms.php:960
|
| 270 |
#: includes/admin/core/class-admin-notices.php:390
|
| 271 |
+
#: includes/core/um-actions-profile.php:592
|
| 272 |
msgid "Remove"
|
| 273 |
msgstr ""
|
| 274 |
|
| 3615 |
#: includes/admin/templates/modal/fonticons.php:11
|
| 3616 |
#: includes/admin/templates/role/publish.php:24
|
| 3617 |
#: includes/core/class-fields.php:2333 includes/core/class-fields.php:2430
|
| 3618 |
+
#: includes/core/um-actions-profile.php:593
|
| 3619 |
+
#: includes/core/um-actions-profile.php:732
|
| 3620 |
+
#: includes/core/um-actions-profile.php:765
|
| 3621 |
+
#: includes/core/um-actions-profile.php:1110
|
| 3622 |
+
#: includes/core/um-actions-profile.php:1117
|
| 3623 |
msgid "Cancel"
|
| 3624 |
msgstr ""
|
| 3625 |
|
| 3982 |
msgstr ""
|
| 3983 |
|
| 3984 |
#: includes/class-config.php:133 includes/class-config.php:745
|
| 3985 |
+
#: includes/core/um-actions-profile.php:1116
|
| 3986 |
#: includes/core/um-actions-user.php:15
|
| 3987 |
msgid "Logout"
|
| 3988 |
msgstr ""
|
| 4250 |
msgid "You must add a shortcode to the content area"
|
| 4251 |
msgstr ""
|
| 4252 |
|
| 4253 |
+
#: includes/core/class-builtin.php:663 includes/core/class-user.php:1546
|
| 4254 |
msgid "Only me"
|
| 4255 |
msgstr ""
|
| 4256 |
|
| 4399 |
msgstr ""
|
| 4400 |
|
| 4401 |
#: includes/core/class-builtin.php:1085
|
| 4402 |
+
#: includes/core/um-actions-profile.php:555
|
| 4403 |
msgid "Change your cover photo"
|
| 4404 |
msgstr ""
|
| 4405 |
|
| 6369 |
msgstr ""
|
| 6370 |
|
| 6371 |
#: includes/core/class-fields.php:2308 includes/core/class-fields.php:2332
|
| 6372 |
+
#: includes/core/um-actions-profile.php:763
|
| 6373 |
msgid "Change photo"
|
| 6374 |
msgstr ""
|
| 6375 |
|
| 6945 |
msgid "Your membership request has been rejected."
|
| 6946 |
msgstr ""
|
| 6947 |
|
| 6948 |
+
#: includes/core/um-actions-profile.php:192
|
| 6949 |
msgid "You are not allowed to edit this user."
|
| 6950 |
msgstr ""
|
| 6951 |
|
| 6952 |
+
#: includes/core/um-actions-profile.php:279
|
| 6953 |
#, php-format
|
| 6954 |
msgid "Your choosed %s"
|
| 6955 |
msgstr ""
|
| 6956 |
|
| 6957 |
+
#: includes/core/um-actions-profile.php:591
|
| 6958 |
msgid "Change cover photo"
|
| 6959 |
msgstr ""
|
| 6960 |
|
| 6961 |
+
#: includes/core/um-actions-profile.php:634
|
| 6962 |
msgid "Upload a cover photo"
|
| 6963 |
msgstr ""
|
| 6964 |
|
| 6965 |
+
#: includes/core/um-actions-profile.php:731
|
| 6966 |
msgid "Upload photo"
|
| 6967 |
msgstr ""
|
| 6968 |
|
| 6969 |
+
#: includes/core/um-actions-profile.php:764
|
| 6970 |
msgid "Remove photo"
|
| 6971 |
msgstr ""
|
| 6972 |
|
| 6973 |
+
#: includes/core/um-actions-profile.php:928
|
| 6974 |
msgid "Tell us a bit about yourself..."
|
| 6975 |
msgstr ""
|
| 6976 |
|
| 6977 |
+
#: includes/core/um-actions-profile.php:944
|
| 6978 |
#, php-format
|
| 6979 |
msgid "This user account status is %s"
|
| 6980 |
msgstr ""
|
| 6981 |
|
| 6982 |
+
#: includes/core/um-actions-profile.php:1083
|
| 6983 |
+
#: includes/core/um-actions-profile.php:1114
|
| 6984 |
msgid "Edit Profile"
|
| 6985 |
msgstr ""
|
| 6986 |
|
| 6987 |
+
#: includes/core/um-actions-profile.php:1115
|
| 6988 |
msgid "My Account"
|
| 6989 |
msgstr ""
|
| 6990 |
|
readme.txt
CHANGED
|
@@ -6,7 +6,7 @@ Donate link:
|
|
| 6 |
Tags: community, member, membership, user-profile, user-registration
|
| 7 |
Requires at least: 4.9
|
| 8 |
Tested up to: 5.2
|
| 9 |
-
Stable tag: 2.0.
|
| 10 |
License: GNU Version 2 or Any Later Version
|
| 11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
| 12 |
|
|
@@ -133,6 +133,12 @@ The plugin works with popular caching plugins by automatically excluding Ultimat
|
|
| 133 |
|
| 134 |
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
|
| 135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
= 2.0.44: May 08, 2019 =
|
| 137 |
|
| 138 |
* Enhancements:
|
| 6 |
Tags: community, member, membership, user-profile, user-registration
|
| 7 |
Requires at least: 4.9
|
| 8 |
Tested up to: 5.2
|
| 9 |
+
Stable tag: 2.0.45
|
| 10 |
License: GNU Version 2 or Any Later Version
|
| 11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
| 12 |
|
| 133 |
|
| 134 |
= Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin =
|
| 135 |
|
| 136 |
+
= 2.0.45: May 08, 2019 =
|
| 137 |
+
|
| 138 |
+
* Bugfixes:
|
| 139 |
+
- Fixed issues with Gutenberg scripts and UM blocks
|
| 140 |
+
- Security vulnerabilities on Profile/Registration submit and file/images uploading
|
| 141 |
+
|
| 142 |
= 2.0.44: May 08, 2019 =
|
| 143 |
|
| 144 |
* Enhancements:
|
ultimate-member.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: 2.0.
|
| 7 |
Author: Ultimate Member
|
| 8 |
Author URI: http://ultimatemember.com/
|
| 9 |
Text Domain: ultimate-member
|
| 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: 2.0.45
|
| 7 |
Author: Ultimate Member
|
| 8 |
Author URI: http://ultimatemember.com/
|
| 9 |
Text Domain: ultimate-member
|
