Changeset 373 for trunk/bp-friends/bp-friends-cssjs.php
- Timestamp:
- 10/07/2008 07:16:51 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/bp-friends/bp-friends-cssjs.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends/bp-friends-cssjs.php
r309 r373 8 8 function friends_add_js() { 9 9 global $bp; 10 11 if ( !isset($_GET['page']) )12 $_GET['page'] = null;13 10 14 if ( $bp['current_component'] == $bp['friends']['slug'] ) { 15 echo ' 16 <script src="' . get_option('siteurl') . '/wp-content/mu-plugins/bp-friends/js/general.js" type="text/javascript"></script>'; 17 } 11 if ( $bp['current_component'] == $bp['friends']['slug'] ) 12 wp_enqueue_script( 'bp-friends-js', site_url() . '/wp-content/mu-plugins/bp-friends/js/general.js' ); 18 13 } 19 add_action( ' wp_head', 'friends_add_js' );14 add_action( 'template_redirect', 'friends_add_js' ); 20 15 21 16 ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)