Make WordPress Core

Ticket #56444: 56444.diff

File 56444.diff, 462 bytes (added by sabernhardt, 2 years ago)

remove nofollow but keep ugc for internal links

  • src/wp-includes/formatting.php

     
    29142914        }
    29152915
    29162916        if ( 'comment_text' === current_filter() ) {
    2917                 $rel = 'nofollow ugc';
     2917                if ( str_starts_with( $url, home_url() ) ) {
     2918                        $rel = 'ugc';
     2919                } else {
     2920                        $rel = 'nofollow ugc';
     2921                }
    29182922        } else {
    29192923                $rel = 'nofollow';
    29202924        }