Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Old Version fixes and change logs (http://forum.bytesforall.com/forumdisplay.php?f=37)
-   -   PATCH 373-05: Enhancement - only load 'comment-reply.js' on pages where it is needed (http://forum.bytesforall.com/showthread.php?t=16900)

juggledad Mar 2, 2012 05:59 AM

PATCH 373-05: Enhancement - only load 'comment-reply.js' on pages where it is needed
 
1 Attachment(s)
Thank to 'DUK' for this idea (see this thread - step 3)

This patch will cause Atahualpa to only load the WordPress 'comment-reply.js' on pages where comments are allowed.

Edit header.php and change line 41 (version 3.7.3) from
HTML Code:

<?php if ( function_exists('wp_list_comments') AND is_singular() ) {        wp_enqueue_script( 'comment-reply' ); } ?>
to
HTML Code:

<?php if ( function_exists('wp_list_comments') AND is_singular() AND (comments_open( $post_id ))) {        wp_enqueue_script( 'comment-reply' ); } ?>
the attached file has the patch already applied. Unzip the file and put it in the Atahualpa folder replacing the version that is there.

ningalooclub Jul 12, 2012 09:27 AM

Just did this to one of my sites and the difference has been great! Thanks!

Is this included in any version changes?

juggledad Jul 12, 2012 09:42 AM

it was included in the codeas of 3.7.4


All times are GMT -6. The time now is 04:32 PM.

Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.