Opened 13 years ago
Closed 13 years ago
#18541 closed enhancement (wontfix)
Add comments_open() conditional to Twenty Eleven's comment-reply.js call
Reported by: | philiparthurmoore | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.2 |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | Cc: |
Description
The current code used to include comment-reply.js
in Twenty Eleven's header.php
is as follows:
if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' );
If a singular page is being displayed and comments are closed, the script is still loaded. The code should be adjusted as follows:
if ( is_singular() && get_option( 'thread_comments' ) && comments_open() ) wp_enqueue_script( 'comment-reply' );
The expected output of this code is for comment-reply.js
to only be loaded on singular pages that have commenting currently open.
Attachments (1)
Change History (7)
#1
follow-up:
↓ 3
@
13 years ago
- Component changed from Themes to Bundled Theme
- Keywords has-patch added
- Version changed from 3.3 to 3.2
#3
in reply to:
↑ 1
@
13 years ago
Replying to ocean90:
You could also reply to a ping. Maybe
&& ( comments_open() || pings_open() )
Isn't comment-reply.js
just used for the threaded comments feature? I don't think pings_open()
is important in this conditional.
Edit: Never mind. I see what you're saying. Sorry about that!
#5
@
13 years ago
See #12932 and read @nacin comment: http://core.trac.wordpress.org/ticket/12932#comment:10
Note: See
TracTickets for help on using
tickets.
You could also reply to a ping. Maybe