- fixed checkboxes with "'" symbols in label;

- fixed User page restriction options;
This commit is contained in:
nikitozzzzzzz
2018-05-03 16:20:46 +03:00
parent 0b21ba4139
commit 03c47ebc45
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -532,7 +532,7 @@ if ( ! class_exists( 'um\core\Access' ) ) {
if ( ! empty( $post->post_type ) && $post->post_type == 'page' ) { if ( ! empty( $post->post_type ) && $post->post_type == 'page' ) {
if ( um_is_core_post( $post, 'login' ) || um_is_core_post( $post, 'register' ) || if ( um_is_core_post( $post, 'login' ) || um_is_core_post( $post, 'register' ) ||
um_is_core_post( $post, 'account' ) || um_is_core_post( $post, 'logout' ) || um_is_core_post( $post, 'account' ) || um_is_core_post( $post, 'logout' ) ||
um_is_core_post( $post, 'password-reset' ) ) um_is_core_post( $post, 'password-reset' ) || um_is_core_post( $post, 'user' ) )
return false; return false;
} }
+6 -1
View File
@@ -798,6 +798,11 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
return true; return true;
} }
$stripslashed = array_map( 'stripslashes', UM()->form()->post_form[ $key ] );
if ( in_array( $value, $stripslashed ) ) {
return true;
}
if ( in_array( html_entity_decode( $value ), UM()->form()->post_form[ $key ] ) ) { if ( in_array( html_entity_decode( $value ), UM()->form()->post_form[ $key ] ) ) {
return true; return true;
} }
@@ -1578,7 +1583,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
if ($visibility == 'view' && $this->set_mode != 'register') return; if ($visibility == 'view' && $this->set_mode != 'register') return;
if (( $visibility == 'view' && $this->set_mode == 'register' ) || if ( ( $visibility == 'view' && $this->set_mode == 'register' ) ||
( isset( $data['editable'] ) && $data['editable'] == 0 && $this->set_mode == 'profile' ) ( isset( $data['editable'] ) && $data['editable'] == 0 && $this->set_mode == 'profile' )
) { ) {
+3
View File
@@ -220,6 +220,9 @@ function um_user_edit_profile( $args ) {
if ( ! empty( $fields ) ) { if ( ! empty( $fields ) ) {
foreach ( $fields as $key => $array ) { foreach ( $fields as $key => $array ) {
/*if ( ! um_can_edit_field( $fields[ $key ] ) )
continue;*/
if ( ! um_can_edit_field( $fields[ $key ] ) && isset( $fields[ $key ]['editable'] ) && ! $fields[ $key ]['editable'] ) if ( ! um_can_edit_field( $fields[ $key ] ) && isset( $fields[ $key ]['editable'] ) && ! $fields[ $key ]['editable'] )
continue; continue;