Opened 21 months ago
Closed 20 months ago
#18541 closed enhancement (wontfix)
Add comments_open() conditional to Twenty Eleven's comment-reply.js call
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Bundled Theme | Version: | 3.2 |
| Severity: | minor | Keywords: | has-patch |
| 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)
philiparthurmoore — 21 months ago
- Component changed from Themes to Bundled Theme
- Keywords has-patch added
- Version changed from 3.3 to 3.2
comment:2
SergeyBiryukov — 21 months ago
- Milestone changed from Awaiting Review to 3.3
comment:3
in reply to:
↑ 1
philiparthurmoore — 21 months 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!
Just ignore my comment too. In Twenty Eleven a reply to a ping isn't supported.
See #12932 and read @nacin comment: http://core.trac.wordpress.org/ticket/12932#comment:10
comment:6
markjaquith — 20 months ago
- Milestone 3.3 deleted
- Resolution set to wontfix
- Status changed from new to closed
Not worth a query, IMO. Agree with Nacin's comment that zeo linked.

You could also reply to a ping. Maybe