Hey @ss88_uk ????
Thank you so much for your kind words and the suggestion.
Good point! ?? I will include this in the upcoming release. But can you try this first?
Please, edit the file /wp-content/plugins/login-as-user/includes/class-w357-login-as-user.php (line 468), and replace the function enqueue_styles() with the code below, and let me know if that worked, please.
public function enqueue_styles() {
$options = get_option('login_as_user_options', array());
$message_display_position_option = (!empty($options['message_display_position'])) ? $options['message_display_position'] : 'top';
$show_admin_link_in_topbar_option = (!empty($options['show_admin_link_in_topbar'])) ? $options['show_admin_link_in_topbar'] : 'yes';
// do not proceed if user is not logged in
$old_user = $this->get_old_user();
if ($old_user instanceof WP_User && ($message_display_position_option !== 'none' || $show_admin_link_in_topbar_option === 'yes')) {
wp_enqueue_style('login-as-user', plugin_dir_url(dirname(__FILE__)) . 'public/css/public.min.css', array(), LOGINASUSER_VERSION, 'all');
wp_enqueue_script('login-as-user', plugin_dir_url(dirname(__FILE__)) . 'public/js/public.min.js', array('jquery'), LOGINASUSER_VERSION, false);
wp_register_style('login-as-user-inline-style', false);
wp_enqueue_style('login-as-user-inline-style');
}
}
Thanks ??