WordPress.org

Make WordPress Core

#23305 closed enhancement (wontfix)

Correction of some minor HTML output issues

Reported by: fob Owned by:
Milestone: Priority: normal
Severity: trivial Version: 3.5
Component: Comments Keywords:
Focuses: Cc:

Description

Even in the latest comment-template.php I found some functions that use single quotes for the HTML output of links instead of double quotes. It works. But wouldn`t it be nicer to avoid a mix of notations in the source code? I personally prefer to use single quotes within functions and double quotes for the HTML output. However. Consistent code should be better than a mix of all. So I would like to suggest renewing some functions like:

  • get_comment_author_email_link

( $return .= '<a href="mailto:'.$email.'">'.$display.'</a>'; )

  • get_comment_author_link

( $return = '<a href="'.$url.'" rel="external nofollow" class="url">'.$author.'</a>'; )

  • get_comment_author_url_link

( $return = $before.'<a href="'.$url.'" rel="external">'.$display.'</a>'.$after; )

and perhaps

  • get_comment_reply_link
  • get_post_reply_link

in order to output double quotes as they are used within most of the other functions that prepare links for the HTML output.

Change History (3)

comment:1 SergeyBiryukov15 months ago

  • Keywords needs-refresh removed
  • Type changed from feature request to enhancement
  • Version changed from trunk to 3.5

Single quotes are consistent with our coding standards:
http://codex.wordpress.org/WordPress_Coding_Standards#Single_and_Double_Quotes

We use them in HTML output in quite a few places, so I don't think changing them in one file would bring more consistency.

comment:2 fob15 months ago

Hmmm... That`s interesting. Thank you for making your position clear to me.

comment:3 helen15 months ago

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

It does indeed happen in many places, and there doesn't seem to be a very strong case for that kind of code churn.

Note: See TracTickets for help on using tickets.