mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Add option to allow users to hide profiles from member page
This commit is contained in:
@@ -12,6 +12,8 @@ class UM_Account {
|
||||
|
||||
add_action('template_redirect', array(&$this, 'form_init'), 10002);
|
||||
|
||||
add_filter('um_predefined_fields_hook', array(&$this,'predefined_fields_hook'),1 );
|
||||
|
||||
$this->current_tab = 'general';
|
||||
|
||||
}
|
||||
@@ -304,4 +306,16 @@ class UM_Account {
|
||||
$ultimatemember->shortcodes->load_template( $template );
|
||||
}
|
||||
|
||||
/***
|
||||
** @filter account fields
|
||||
****/
|
||||
function predefined_fields_hook( $predefined_fields ){
|
||||
|
||||
$account_hide_in_directory = um_get_option('account_hide_in_directory');
|
||||
if( ! $account_hide_in_directory ){
|
||||
unset( $predefined_fields['hide_in_members'] );
|
||||
}
|
||||
|
||||
return $predefined_fields;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user