[buddypress-trac] [BuddyPress] #2024: bp_core_override_adminbar_css() should no longer be used

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Mon Mar 8 07:48:19 UTC 2010


#2024: bp_core_override_adminbar_css() should no longer be used
-----------------------------------+----------------------------------------
Reporter:  TobiasBg                |       Owner:       
    Type:  enhancement             |      Status:  new  
Priority:  trivial                 |   Milestone:  1.2.2
Keywords:  has-patch dev-feedback  |  
-----------------------------------+----------------------------------------

Comment(by TobiasBg):

 r-a-y: Technically speaking you are correct in your first paragraph, that
 the function is executed when one of the two situations occurs.

 However, please take a look at what the function then actually does: It
 adds some CSS for the CSS selector #wp-admin-bar.

 However, the matching HTML element is only included if both of your
 mentioned situations do *not* occur.
 ([http://trac.buddypress.org/browser/trunk/bp-core/bp-core-
 adminbar.php#L14 here])

 So, two problems:

 - The function adds CSS that will never match a selector, because of
 exactly opposing condition checks (for the constant or for the setting
 from the admin page).
 (S, it does *not* really serve purpose, and that actually is the main
 issue I'm addressing here.)

 - The function adds the CSS in the body (which is invalid HTML and which
 you address in your ticket #2153).

 Moving it to wp_head as you suggest would fix the second issue, however we
 would still be in a situation where we add CSS to the page that is totally
 useless, because it will *by design* never affect anything.

 Do you now understand why the function should be removed?

-- 
Ticket URL: <http://trac.buddypress.org/ticket/2024#comment:7>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list