Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#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:


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
8 years 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:

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
8 years ago

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

#3 @helen
8 years 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.