Making WordPress.org

Ticket #1344: 1344.diff

File 1344.diff, 1.1 KB (added by DrewAPicture, 9 years ago)
  • wordpress.org/public_html/style/trac/wp-trac.js

     
    4040
    4141        gardenerKeywordList = [ 'commit', 'early', 'i18n-change', 'good-first-bug' ];
    4242
     43        reservedTerms = [
     44                'access', 'deprecated', 'global', 'ignore', 'internal', 'link', 'method',
     45                'package', 'return','see', 'since', 'subpackage', 'todo', 'type', 'var'
     46        ];
     47
    4348        wpTrac = {
    4449
    4550                gardener: typeof wpBugGardener !== 'undefined',
     
    9297                                $comment = $( this ).html();
    9398                                if ( mentionsRegEx.test( $comment ) ) {
    9499                                        $comment = $comment.replace( mentionsRegEx, function( match, username ) {
     100                                                if ( 1 === $.inArray( username, reservedTerms ) ) {
     101                                                        return username;
     102                                                }
     103
    95104                                                var meClass = ( username === wpTrac.currentUser ) ? ' me' : '';
    96105                                                return ' <a class="mention' + meClass + '" href="https://profiles.wordpress.org/' + username + '">@' + username + '</a>';
    97106                                        } );