Opened 4 years ago
Closed 4 years ago
#8326 closed enhancement (fixed)
Apply UGC attribute for activity links
Reported by: | vapvarun | Owned by: | imath |
---|---|---|---|
Milestone: | 7.0.0 | Priority: | normal |
Severity: | normal | Version: | 6.1.0 |
Component: | Activity | Keywords: | has-patch 2nd-opinion |
Cc: |
Description
Recently Google has updated its policy for nofollow attributes and they will be considered as hints.
Link attribution can be done in three ways: "nofollow", "sponsored", and "ugc" — each signifying a different meaning. (The fourth way, default, means no value attributed).
Activities are in general user-generated content, we can use UGC instead of nofollow or combination of both attributes.
for example, rel="nofollow ugc" is also valid.
https://buddypress.org/support/topic/how-to-add-ugc-into-outbound-links-rel
Attachments (1)
Change History (9)
#1
@
4 years ago
- Keywords has-patch commit added
- Milestone changed from Awaiting Review to 7.0.0
Thanks a lot @vapvarun let’s do it!
#2
@
4 years ago
- Keywords 2nd-opinion added; commit removed
I just had another look into it, what happens for activities containing links before this patch is applied ? I believe they shouldn't have the ugc
rel
attribute.
We should probably do str_replace( array( ' rel="nofollow"', " rel='nofollow'", ' rel="nofollow ugc"', " rel='nofollow ugc'"), '', $text )
. What do you think?
#3
@
4 years ago
@imath yes it will be more general scope, I had considered that Nofollow is added using the above filter almost all activities as HTML is not allowed in general unless admins have added with Nofollow manually on purpose.
With the initial approach, it will allow them to keep those links with nofollow only without UGC on which they have added Nofollow manually. eg https://prnt.sc/tbus97
#4
@
4 years ago
@vapvarun I'm now wondering: should we only add this ugc
attributes for the activity_update
activity type ? Or should it be all activity type, some activity types, if so which ones ?
#5
@
4 years ago
@imath, we can go with all activities in general terms. All activities are UGC, whether it's a specific activity type or added by any user role.
nofollow with UGC