Opened 15 years ago
Closed 15 years ago
#18541 closed enhancement (wontfix)
Add comments_open() conditional to Twenty Eleven's comment-reply.js call
| Reported by: | philiparthurmoore | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Bundled Theme | Version: | 3.2 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
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
@
15 years ago
- Component Themes → Bundled Theme
- Keywords has-patch added
- Version 3.3 → 3.2
#3
in reply to: ↑ 1
@
15 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
@
15 years ago
See #12932 and read @nacin comment: http://core.trac.wordpress.org/ticket/12932#comment:10
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
You could also reply to a ping. Maybe