WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/30/2019 01:29:10 AM (7 weeks ago)
Author:
SergeyBiryukov
Message:

Comments: Add rel="nofollow ugc" attribute to links in comments.

UGC stands for User Generated Content, and the ugc attribute value is recommended for links within user generated content, such as comments and forum posts.

See https://webmasters.googleblog.com/2019/09/evolving-nofollow-new-ways-to-identify.html.

Props audrasjb, joostdevalk, dkarfa, SergeyBiryukov.
Fixes #48022.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r46111 r46349  
    247247add_action( 'check_comment_flood', 'check_comment_flood_db', 10, 4 );
    248248add_filter( 'comment_flood_filter', 'wp_throttle_comment_flood', 10, 3 );
    249 add_filter( 'pre_comment_content', 'wp_rel_nofollow', 15 );
     249add_filter( 'pre_comment_content', 'wp_rel_ugc', 15 );
    250250add_filter( 'comment_email', 'antispambot' );
    251251add_filter( 'option_tag_base', '_wp_filter_taxonomy_base' );
Note: See TracChangeset for help on using the changeset viewer.