Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#13541 closed enhancement (wontfix)

paginate_comments_links() should generate a containing <div>

Reported by: jestro Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9.2
Component: Comments Keywords:
Focuses: Cc:


The markup generated by paginate_comments_links() is not ideal. You must create your own containing <div> in order to properly style the element (give it margin, padding, etc.). This works well when comment pagination is enabled, but your <div> will not disappear when the user has disabled comment pagination. This leaves extra spacing and unnecessary markup cruft. If you leave out the containing <div> entirely there is no clean way of properly styling the element.

Change History (3)

#1 @greenshady
8 years ago

While I would agree with this when the function was first added, it could cause potential issues by changing it. Some themes work around this by checking for the page_comments option in the DB. Adding an extra <div> might result in multiple <div>s for those themes and possibly mess up specific styles. I think it's unlikely, but I'm not a huge fan of changing the output of a function once it's already been released, especially after several versions.

#2 @jestro
8 years ago

I wish I had noticed it when it first made it into the core :)

I agree that this might break some themes but I would guess the vast majority are using the template tag "out of the box". If the themes working around the issue are being maintained it should be a quick fix to remove any extra markup they were generating.

#3 @scribu
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Sorry, back-compat wins.

Note: See TracTickets for help on using tickets.