Opened 8 years ago
Closed 7 years ago
#34362 closed feature request (duplicate)
Improvements to comment_type function
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Comments | Keywords: | needs-patch reporter-feedback |
Focuses: | Cc: |
Description
comment_type should have a filter for non-standard comment types, and should have, as other functions do, an option to return the text, as opposed to echoing it.
Attachments (1)
Change History (9)
This ticket was mentioned in Slack in #core by boone. View the logs.
8 years ago
#3
@
8 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
#5
@
8 years ago
- Keywords reporter-feedback added
@dshanske get_comment_type()
already allows you to just get the comment_type (without echoing it), can you provide some details around why this other function wouldn't fit your use-case?
I agree that the comment_type
is very inflexible, and I like the idea of adding a filter here, but I don't like the idea of adding a fourth parameter.
#6
@
8 years ago
@rachelbaker I didn't write the patch. My original point was that there wasn't consistency in the functions compared to similar functions.
My use case was custom comment types. But get_commment_type allows you to get the name of the type, not the presentation name. For example...
'pingback' may be the comment type, but the presentation name might be Pingback or whatever in another language.
Personally, I'd like to deprecate the first three parameters in favor of a filter, but that leads to backward compatibility issues.
Related #12668