Skip to:
Content

BuddyPress.org

Ticket #969: comment-reply-script.patch

File comment-reply-script.patch, 1.5 KB (added by junsuijin, 16 years ago)
  • bp-core/bp-core-templatetags.php

     
    11841184                echo $bp->root_domain;
    11851185}
    11861186
     1187function bp_enqueue_script_comment_reply() {
     1188        global $wp_scripts;
    11871189
     1190        wp_enqueue_script(
     1191                'comment-reply',
     1192                $wp_scripts->registered['comment-reply']->src,
     1193                $wp_scripts->registered['comment-reply']->deps,
     1194                $wp_scripts->registered['comment-reply']->ver,
     1195                true // print in footer
     1196        );
     1197}
     1198
     1199
    11881200/* Template functions for fetching globals, without querying the DB again
    11891201   also means we dont have to use the $bp variable in the template (looks messy) */
    11901202
  • bp-themes/bp-sn-framework/comments.php

     
    1111
    1212        <div id="comments-template">
    1313
    14                 <?php if ( have_comments() ) : ?>
     14                <?php if ( have_comments() ) :
     15                        if ( get_option( 'thread_comments' ) )
     16                                bp_enqueue_script_comment_reply() ?>
    1517
    1618                        <div id="comments">
    1719
     
    2022                                <?php do_action( 'bp_before_blog_comment_list' ) ?>
    2123
    2224                                <ol class="commentlist">
    23                                         <?php wp_list_comments( array( 'style' => 'ol', 'type' => 'all' ) ); ?>
     25                                        <?php wp_list_comments( array( 'style' => 'ul', 'type' => 'all' ) ); ?>
    2426                                </ol><!-- .comment-list -->
    2527
    2628                                <?php do_action( 'bp_after_blog_comment_list' ) ?>