Changeset 6850
- Timestamp:
- 03/22/2013 06:30:18 PM (12 years ago)
- Location:
- trunk/bp-templates/bp-legacy
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-templates/bp-legacy/buddypress-functions.php
r6829 r6850 103 103 add_filter( 'bp_enqueue_scripts', array( $this, 'localize_scripts' ) ); // Enqueue theme script localization 104 104 add_action( 'bp_head', array( $this, 'head_scripts' ) ); // Output some extra JS in the <head> 105 106 /** Body no-js Class ********************************************************/ 107 add_filter( 'body_class', array( $this, 'add_nojs_body_class' ), 20, 1 ); 105 108 106 109 /** Buttons ***********************************************************/ … … 296 299 297 300 <?php 301 } 302 303 /** 304 * Adds the no-js class to the body tag. 305 * 306 * This function ensures that the <body> element will have the 'no-js' class by default. If you're 307 * using JavaScript for some visual functionality in your theme, and you want to provide noscript 308 * support, apply those styles to body.no-js. 309 * 310 * The no-js class is removed by the JavaScript created in buddypress.js. 311 * 312 * @since BuddyPress (1.7) 313 */ 314 public function add_nojs_body_class( $classes ) { 315 if ( ! in_array( 'no-js', $classes ) ) 316 $classes[] = 'no-js'; 317 318 return array_unique( $classes ); 298 319 } 299 320 -
trunk/bp-templates/bp-legacy/js/buddypress.js
r6838 r6850 1228 1228 }); 1229 1229 }); 1230 1231 /* if js is enabled then replace the no-js class by a js one */ 1232 if( jq('body').hasClass('no-js') ) 1233 jq('body').attr('class', jq('body').attr('class').replace( /no-js/,'js' ) ); 1234 1230 1235 }); 1231 1236
Note: See TracChangeset
for help on using the changeset viewer.