[buddypress-trac] [BuddyPress] #3389: Enqueueing CSS of bp-default breaks child theme layouts

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Mon Aug 15 19:46:20 UTC 2011


#3389: Enqueueing CSS of bp-default breaks child theme layouts
---------------------+------------------------------
 Reporter:  mercime  |       Owner:
     Type:  defect   |      Status:  new
 Priority:  normal   |   Milestone:  Awaiting Review
Component:  Theme    |     Version:  1.5
 Severity:  normal   |  Resolution:
 Keywords:           |
---------------------+------------------------------

Comment (by karmatosed):

 I'm not sure that will catch all some enqueue but still would be broken as
 a result of this.  However it's I still think a case of education.

 I just did a basic test run and rather than de-registering used the
 function like this:


 {{{
 function bp_dtheme_enqueue_styles() {
         // Bump this when changes are made to bust cache
         $version = '20110804';

         // Default CSS
         //wp_enqueue_style( 'bp-default-main',
 get_template_directory_uri() . '/_inc/css/default.css', array(), $version
 );

         // Right to left CSS
         if ( is_rtl() )
                 wp_enqueue_style( 'bp-default-main-rtl',
 get_template_directory_uri() . '/_inc/css/default-rtl.css', array( 'bp-
 default-main' ), $version );
 }
 add_action( 'wp_print_styles', 'bp_dtheme_enqueue_styles' );
 }}}

 I put that in the child functions.php and commented out the style to show
 you can just remove it.

 Now this works.  You'd just enqueue your styles in that function then if
 had own.

 This still breaks themes but is the way I'd suggest aside from de-
 register.

 Which ever way it's either a hack to get around older themes and
 requirement for education as hack won't always stay in or education now
 and then no hack.  Brutal maybe but way I see it possibly in a simplistic
 overview.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3389#comment:10>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list