[wp-trac] [WordPress Trac] #48022: Support "ugc" rel attribute value in comments
WordPress Trac
noreply at wordpress.org
Thu Oct 17 03:19:59 UTC 2019
#48022: Support "ugc" rel attribute value in comments
-------------------------------------------------+-------------------------
Reporter: audrasjb | Owner:
| SergeyBiryukov
Type: task (blessed) | Status: reopened
Priority: normal | Milestone: 5.3
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests has-dev- | Focuses:
note needs-testing |
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
Replying to [comment:18 desrosj]:
> On first glance, `make_clickable()` is only used for comment content in
Core. However, I'm not sure how it is being used by plugins and themes in
the wild.
Thanks for the patch!
Looking at [https://wpdirectory.net/search/01DQB013M048BX8GBWNQSZM4HW
plugins] and [https://wpdirectory.net/search/01DQBTMHZKHS5T3YABWK8TH42H
themes], there are 1292 and 216 matches, respectively, vs. 101 and 3
matches for `wp_rel_nofollow()`, per results from comment:7.
At a glance, not all of the `make_clickable()` matches need the
`rel="ugc"` attribute. If the content in question is not user-generated,
it might not be appropriate.
What about just adding it for comments for now by checking if
`comment_text` is current filter, and adding a `make_clickable_rel` filter
to customize this behavior? [attachment:"48022.6.diff"] implements that.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48022#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list