This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 6th, 2011  |  syntax: None  |  size: 1.48 KB  |  views: 72  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. if ( !function_exists( 'bp_dtheme_enqueue_styles' ) ) :
  3. /**
  4.  * Enqueue theme CSS safely
  5.  *
  6.  * For maximum flexibility, BuddyPress Default's stylesheet is enqueued in the following fashion.
  7.  * If you're building a child theme of bp-default, you can prevent this enqueuing by overriding
  8.  * this function in your child theme's functions.php:
  9.  *   if ( !function_exists( 'bp_dtheme_enqueue_styles' ) ) :
  10.  *       function bp_dtheme_enqueue_styles() {}
  11.  *   endif;
  12.  *
  13.  * @see http://codex.wordpress.org/Function_Reference/wp_enqueue_style
  14.  * @see http://codex.buddypress.org/releases/1-5-developer-and-designer-information/
  15.  * @since 1.5
  16.  */
  17. function bp_dtheme_enqueue_styles() {
  18.         // Bump this when changes are made to bust cache
  19.         $version = '20110830';
  20.  
  21.         // Default CSS
  22.         wp_enqueue_style( 'bp-default-main', get_template_directory_uri() . '/_inc/css/default.css', array(), $version );
  23.  
  24.         // Default CSS RTL
  25.         if ( is_rtl() )
  26.                 wp_enqueue_style( 'bp-default-main-rtl',  get_template_directory_uri() . '/_inc/css/default-rtl.css', array( 'bp-default-main' ), $version );
  27.  
  28.         // Responsive layout
  29.         if ( current_theme_supports( 'bp-default-responsive' ) ) {
  30.                 wp_enqueue_style( 'bp-default-responsive', get_template_directory_uri() . '/_inc/css/responsive.css', array( 'bp-default-main' ), $version );
  31.  
  32.                 if ( is_rtl() )
  33.                         wp_enqueue_style( 'bp-default-responsive-rtl', get_template_directory_uri() . '/_inc/css/responsive-rtl.css', array( 'bp-default-responsive' ), $version );
  34.         }
  35. }
  36. ?>
clone this paste RAW Paste Data