Suggestion: Do not load “admin-toolbar-menu.css” for not logged-in users
-
Good day,
I found that “admin-toolbar-menu.css” fole is loaded every time, even though for normal visitors it is not needed (i.e. this is actually bad SEO/PageSpeed practice).
It is done unconditionally in class-aioseop-core.php in the front_enqueue_styles() method.
The CSS rules from that file are used in the admin_bar_menu() method, which is used only when user is logged-in (this is checked in add_hooks()) and some other conditions.
So I would suggest that this check could be added as well in class-aioseop-core.php in the front_enqueue_styles(), so something like the following two lines would be great:
if ( !is_user_logged_in() ) return;
- The topic ‘Suggestion: Do not load “admin-toolbar-menu.css” for not logged-in users’ is closed to new replies.