Opened 10 years ago
Closed 10 years ago
#36571 closed enhancement (fixed)
Add `$comment` parameter to `get_comment_author_email_link()`
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.6 | Priority: | normal |
| Severity: | normal | Version: | 2.7 |
| Component: | Comments | Keywords: | has-patch has-unit-tests |
| Focuses: | Cc: |
Description
To use this function (also its related output function) for any specific comment, let's add a $comment parameter.
Attachments (5)
Change History (17)
#2
follow-up:
↓ 4
@
10 years ago
What about comment_author_url_link() and get_comment_author_url_link()?
#3
@
10 years ago
I know that the default value of 0 for $comment is intended to trigger the empty() check at the beginning of get_comment(). IMHO it would be more transparent if the default value were null, since this would indicate that no value is being provided (rather than a value of 0, which makes me do a double-take when I read the function signature, since a comment can't have an ID of 0).
#4
in reply to:
↑ 2
@
10 years ago
Replying to SergeyBiryukov:
What about
comment_author_url_link()andget_comment_author_url_link()?
I created a separate ticket for that in #36573.
This ticket was mentioned in Slack in #core by drew. View the logs.
10 years ago
#8
@
10 years ago
36571.3.diff removes the spacing changes to other paramter docs – makes for a cleaner, easier to grok commit. We'll follow up and fix the spacing. Also, $comment in both instances is a new parameter in core nomenclature. Arguments are sub-parameter in this context :-)
#10
@
10 years ago
36571.5.diff makes the following changes to 36571.4.diff :
- Share the same comment fixture across the new tests (using
wpSetUpBeforeClass()etc) - During test teardown, clear the
$commentglobal and readd theantispambotfilter, to avoid test pollution - Use
nullfor a default value of the new param rather than0 - Only use the
@ticketflag for test methods that are directly related to the enhancement being introduced here
Changes are looking good to me.
patch adding the parameter