Changeset 2688 for branches/plugin/bbp-themes/bbp-twentyten/functions.php
- Timestamp:
- 12/06/2010 03:18:19 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-themes/bbp-twentyten/functions.php
r2679 r2688 98 98 99 99 /** 100 * bbp_twentyten_enqueue_topic_script () 101 * 102 * Enqueue the topic page Javascript file 103 * 104 * @package bbPress 105 * @subpackage bbPress TwentyTen 106 * @since bbPress (r2652) 107 * 108 * @return void 109 */ 110 function bbp_twentyten_enqueue_topic_script () { 111 if ( !bbp_is_topic() ) 112 return; 113 114 wp_enqueue_script( 'bbp_topic', get_stylesheet_directory_uri() . '/js/topic.js', array( 'wp-lists' ), '20101202' ); 115 } 116 add_filter( 'wp_enqueue_scripts', 'bbp_twentyten_enqueue_topic_script' ); 100 * bbp_twentyten_enqueue_scripts () 101 * 102 * Enqueue the required Javascript files 103 * 104 * @package bbPress 105 * @subpackage bbPress TwentyTen 106 * @since bbPress (r2652) 107 * 108 * @return void 109 */ 110 function bbp_twentyten_enqueue_scripts () { 111 if ( bbp_is_topic() ) 112 wp_enqueue_script( 'bbp_topic', get_stylesheet_directory_uri() . '/js/topic.js', array( 'wp-lists' ), '20101202' ); 113 114 if ( bbp_is_user_profile_edit() ) 115 wp_enqueue_script( 'user-profile' ); 116 } 117 add_action( 'wp_enqueue_scripts', 'bbp_twentyten_enqueue_scripts' ); 117 118 118 119 /** … … 128 129 */ 129 130 function bbp_twentyten_scripts () { 130 if ( !bbp_is_topic() ) 131 return; ?> 131 if ( bbp_is_topic() ) : ?> 132 132 133 133 <script type='text/javascript'> … … 137 137 </script> 138 138 139 <?php 139 <?php elseif ( bbp_is_user_profile_edit() ) : ?> 140 141 <script type="text/javascript" charset="utf-8"> 142 if ( window.location.hash == '#password' ) { 143 document.getElementById('pass1').focus(); 144 } 145 </script> 146 147 <?php 148 endif; 140 149 } 141 150 add_filter( 'wp_head', 'bbp_twentyten_scripts', -1 );
Note: See TracChangeset
for help on using the changeset viewer.