Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#23305 closed enhancement (wontfix)

Correction of some minor HTML output issues

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

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)

#1 @SergeyBiryukov
14 years ago

  • Keywords needs-refresh removed
  • Type feature request → enhancement
  • Version trunk → 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.

#2 @fob
14 years ago

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

#3 @helen
14 years ago

  • Milestone Awaiting Review
  • Resolution → wontfix
  • Status new → 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.