mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 14:13:46 +09:00
- reviewed #769;
- added `get_member_directory_id()` function for getting member directory ID based on page ID; - commented hooks 'um_prepare_user_results_array', 'um_prepare_user_results_array_meta' - added snippet fo hiding filters from member directory based on public or private visibility;
This commit is contained in:
@@ -1515,10 +1515,10 @@ function um_can_view_field( $data ) {
|
||||
UM()->fields()->set_mode = '';
|
||||
}
|
||||
|
||||
if ( isset( $data['public'] ) && UM()->fields()->set_mode != 'register' ) {
|
||||
if ( isset( $data['public'] ) && 'register' !== UM()->fields()->set_mode ) {
|
||||
|
||||
$can_edit = false;
|
||||
$current_user_roles = [];
|
||||
$can_edit = false;
|
||||
$current_user_roles = array();
|
||||
if ( is_user_logged_in() ) {
|
||||
|
||||
$can_edit = UM()->roles()->um_current_user_can( 'edit', um_user( 'ID' ) );
|
||||
@@ -1563,7 +1563,6 @@ function um_can_view_field( $data ) {
|
||||
$can_view = apply_filters( 'um_can_view_field_custom', $can_view, $data );
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return apply_filters( 'um_can_view_field', $can_view, $data );
|
||||
|
||||
Reference in New Issue
Block a user