Hi Evgeny,
Thanks for the plugin, great idea. I agree with the previous thread that this should be in core.
I think what Prometheus Fire is talking about is that in Multisite and BuddyPress the admin bar may be visible even to non-logged-in users. Your plugin will not insert its styles in that context. To fix the issue, change if ( is_user_logged_in() ) {
to if ( function_exists( 'is_admin_bar_showing' ) AND is_admin_bar_showing() ) {
. This means the plugin will require at least WP 3.1 but that seems reasonable.
I’ve made a few tweaks to the styles that the plugin inserts which may be helpful. Could you consider changing the following:
- reduce the min-width to 320px to accommodate mobile screens:
#wpadminbar { min-width: 320px; }
- add a top margin to the user avatar because setting the font-size to 0 kills the line-height and vertical-align properties which give it space. Adding the following declaration fixes this:
#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img { margin-top: 4px; }
.
Finally, perhaps you could put the plugin up on GitHub so people can contribute more easily?
Thanks again,
Christian