Changeset 3389 for branches/plugin/bbp-themes/bbp-twentyten/functions.php
- Timestamp:
- 08/07/2011 05:15:27 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-themes/bbp-twentyten/functions.php
r3374 r3389 35 35 function bbp_twentyten_enqueue_styles () { 36 36 37 $version = 20110807; 38 37 39 // Right to left 38 40 if ( is_rtl() ) { 39 41 40 42 // TwentyTen 41 wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '', 20100503, 'screen' );42 wp_enqueue_style( 'twentyten-rtl', get_template_directory_uri() . '/rtl.css', 'twentyten', 20100503, 'screen' );43 wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '', $version, 'screen' ); 44 wp_enqueue_style( 'twentyten-rtl', get_template_directory_uri() . '/rtl.css', 'twentyten', $version, 'screen' ); 43 45 44 46 // bbPress specific 45 wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/css/bbpress-rtl.css', 'twentyten-rtl', 20100503, 'screen' );47 wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/css/bbpress-rtl.css', 'twentyten-rtl', $version, 'screen' ); 46 48 47 49 // Left to right … … 49 51 50 52 // TwentyTen 51 wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '', 20100503, 'screen' );53 wp_enqueue_style( 'twentyten', get_template_directory_uri() . '/style.css', '', $version, 'screen' ); 52 54 53 55 // bbPress specific 54 wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/css/bbpress.css', 'twentyten', 20100503, 'screen' );56 wp_enqueue_style( 'bbp-twentyten-bbpress', get_stylesheet_directory_uri() . '/css/bbpress.css', 'twentyten', $version, 'screen' ); 55 57 } 56 58 } … … 70 72 */ 71 73 function bbp_twentyten_enqueue_scripts () { 74 75 $version = 20110807; 76 72 77 if ( bbp_is_single_topic() ) 73 wp_enqueue_script( 'bbp_topic', get_stylesheet_directory_uri() . '/js/topic.js', array( 'wp-lists' ), '20101202');78 wp_enqueue_script( 'bbp_topic', get_stylesheet_directory_uri() . '/js/topic.js', array( 'wp-lists' ), $version ); 74 79 75 80 if ( bbp_is_single_user_edit() ) 76 81 wp_enqueue_script( 'user-profile' ); 77 82 } 78 add_action( 'bbp_ setup_theme_compat', 'bbp_twentyten_enqueue_scripts' );83 add_action( 'bbp_enqueue_scripts', 'bbp_twentyten_enqueue_scripts' ); 79 84 endif; 80 85 … … 139 144 'currentUserId' => $user_id, 140 145 'topicId' => bbp_get_topic_id(), 141 'favoritesLink' => bbp_get_favorites_permalink( $user_id ),142 'isFav' => (int) bbp_is_user_favorite( $user_id ),143 'favLinkYes' => __( 'favorites', 'bbpress' ),144 'favLinkNo' => __( '?', 'bbpress' ),145 'favYes' => __( 'This topic is one of your %favLinkYes% [%favDel%]', 'bbpress' ),146 'favNo' => __( '%favAdd% (%favLinkNo%)', 'bbpress' ),147 'favDel' => __( '×', 'bbpress' ),148 'favAdd' => __( 'Add this topic to your favorites', 'bbpress' )149 146 ); 150 147 148 // Favorites 149 if ( bbp_is_favorites_active() ) { 150 $localizations['favoritesActive'] = 1; 151 $localizations['favoritesLink'] = bbp_get_favorites_permalink( $user_id ); 152 $localizations['isFav'] = (int) bbp_is_user_favorite( $user_id ); 153 $localizations['favLinkYes'] = __( 'favorites', 'bbpress' ); 154 $localizations['favLinkNo'] = __( '?', 'bbpress' ); 155 $localizations['favYes'] = __( 'This topic is one of your %favLinkYes% [%favDel%]', 'bbpress' ); 156 $localizations['favNo'] = __( '%favAdd% (%favLinkNo%)', 'bbpress' ); 157 $localizations['favDel'] = __( '×', 'bbpress' ); 158 $localizations['favAdd'] = __( 'Add this topic to your favorites', 'bbpress' ); 159 } else { 160 $localizations['favoritesActive'] = 0; 161 } 162 163 // Subscriptions 151 164 if ( bbp_is_subscriptions_active() ) { 152 165 $localizations['subsActive'] = 1; … … 161 174 wp_localize_script( 'bbp_topic', 'bbpTopicJS', $localizations ); 162 175 } 163 add_filter( 'bbp_ setup_theme_compat', 'bbp_twentyten_topic_script_localization' );176 add_filter( 'bbp_enqueue_scripts', 'bbp_twentyten_topic_script_localization' ); 164 177 endif; 165 178
Note: See TracChangeset
for help on using the changeset viewer.