Changeset 3265 for branches/plugin/bbpress.php
- Timestamp:
- 05/29/2011 01:51:02 PM (15 years ago)
- File:
-
- 1 edited
-
branches/plugin/bbpress.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbpress.php
r3249 r3265 240 240 var $tab_index; 241 241 242 /** Theme Compat **********************************************************/ 243 244 /** 245 * @var string Theme to use for theme compatibility 246 */ 247 var $theme_compat = ''; 248 249 /** 250 * @var bool If we are currently in theme compatibility 251 */ 252 var $in_theme_compat = false; 253 242 254 /** Functions *************************************************************/ 243 255 … … 425 437 // Generate rewrite rules 426 438 add_action( 'bbp_generate_rewrite_rules', array( $this, 'generate_rewrite_rules' ), 10 ); 427 428 // Check theme compatability429 add_action( 'bbp_setup_theme_compat', array( $this, 'theme_compat' ), 10 );430 439 } 431 440 … … 889 898 return $wp_rewrite; 890 899 } 891 892 /**893 * If not using a bbPress compatable theme, enqueue some basic styling and js894 *895 * @since bbPress (r3029)896 *897 * @global bbPress $bbp898 * @uses bbp_set_theme_compat() Set the compatable theme to bbp-twentyten899 * @uses current_theme_supports() Check bbPress theme support900 * @uses wp_enqueue_style() Enqueue the bbp-twentyten default CSS901 * @uses wp_enqueue_script() Enqueue the bbp-twentyten default topic JS902 */903 function theme_compat() {904 global $bbp;905 906 // Check if current theme supports bbPress907 if ( !current_theme_supports( 'bbpress' ) ) {908 909 // Set the compat_theme global for help with loading template parts910 bbp_set_theme_compat( $bbp->themes_dir . '/bbp-twentyten' );911 912 /** Default CSS ***************************************************/913 914 // Do not enqueue CSS in admin915 if ( !is_admin() ) {916 917 // Right to left918 if ( is_rtl() ) {919 wp_enqueue_style( 'bbpress-style', $bbp->themes_url . '/bbp-twentyten/css/bbpress-rtl.css' );920 921 // Left to right922 } else {923 wp_enqueue_style( 'bbpress-style', $bbp->themes_url . '/bbp-twentyten/css/bbpress.css' );924 }925 }926 }927 }928 900 } 929 901
Note: See TracChangeset
for help on using the changeset viewer.