Changeset 3655
- Timestamp:
- 01/04/2011 07:47:03 PM (14 years ago)
- Location:
- trunk/bp-themes/bp-default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/functions.php
r3653 r3655 346 346 add_action( 'widgets_init', 'bp_dtheme_widgets_init' ); 347 347 348 /**349 * Add the JS needed for blog comment replies350 *351 * @since 1.2352 */353 function bp_dtheme_add_blog_comments_js() {354 if ( is_singular() && get_option( 'thread_comments' ) )355 wp_enqueue_script( 'comment-reply' );356 }357 add_action( 'template_redirect', 'bp_dtheme_add_blog_comments_js' );358 359 348 if ( !function_exists( 'bp_dtheme_blog_comments' ) ) : 360 349 /** … … 636 625 return $posts; 637 626 } 627 628 /** 629 * In BuddyPress 1.2.x, this added the javascript needed for blog comment replies. 630 * As of 1.3.x, we recommend that you enqueue the comment-reply javascript in your theme's header.php. 631 * 632 * @deprecated 1.3 633 * @deprecated Enqueue the comment-reply script in your theme's header.php. 634 * @since 1.2 635 */ 636 function bp_dtheme_add_blog_comments_js() { 637 _deprecated_function( __FUNCTION__, '1.3', "Enqueue the comment-reply script in your theme's header.php." ); 638 if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) 639 wp_enqueue_script( 'comment-reply' ); 640 } 638 641 ?> -
trunk/bp-themes/bp-default/header.php
r3600 r3655 11 11 <link rel="pingback" href="<?php bloginfo( 'pingback_url' ) ?>" /> 12 12 13 <?php wp_head(); ?> 13 <?php 14 if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) 15 wp_enqueue_script( 'comment-reply' ); 16 17 wp_head(); 18 ?> 14 19 </head> 15 20
Note: See TracChangeset
for help on using the changeset viewer.