mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed roles priority and added functions to work with roles (all|priority|um role);
- fixed um_is_core_page function with WPML; - added general admin notice when user have old extensions; - text changes;
This commit is contained in:
@@ -1830,7 +1830,7 @@ Host: <?php echo $host . "\n"; ?>
|
||||
---- Current User Details --
|
||||
|
||||
<?php $user = wp_get_current_user(); ?>
|
||||
Role: <?php echo um_user( 'role' ). "\n"; ?>
|
||||
Role: <?php echo implode( ', ', um_user( 'roles' ) ). "\n"; ?>
|
||||
|
||||
|
||||
--- WordPress Configurations ---
|
||||
|
||||
@@ -157,36 +157,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
exit( wp_redirect( remove_query_arg('um_adm_action') ) );
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Opt-in tracking
|
||||
***/
|
||||
add_action('um_admin_do_action__opt_into_tracking', 'um_admin_do_action__opt_into_tracking');
|
||||
function um_admin_do_action__opt_into_tracking( $action ) {
|
||||
if ( !is_admin() || !current_user_can('manage_options') ) die();
|
||||
|
||||
UM()->options()->update( 'um_allow_tracking', 1 );
|
||||
update_option( 'um_tracking_notice', 1 );
|
||||
|
||||
$tracking = new um\core\Tracking();
|
||||
$tracking->send_checkin(true);
|
||||
|
||||
exit( wp_redirect( remove_query_arg('um_adm_action') ) );
|
||||
}
|
||||
|
||||
/***
|
||||
*** @Opt-out of tracking
|
||||
***/
|
||||
add_action('um_admin_do_action__opt_out_of_tracking', 'um_admin_do_action__opt_out_of_tracking');
|
||||
function um_admin_do_action__opt_out_of_tracking( $action ){
|
||||
if ( !is_admin() || !current_user_can('manage_options') ) die();
|
||||
|
||||
UM()->options()->update( 'um_allow_tracking', 0 );
|
||||
update_option('um_tracking_notice', 1 );
|
||||
|
||||
exit( wp_redirect( remove_query_arg('um_adm_action') ) );
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @various user actions
|
||||
***/
|
||||
|
||||
Reference in New Issue
Block a user