Making WordPress.org


Ignore:
Timestamp:
10/10/2015 07:21:00 PM (9 years ago)
Author:
ocean90
Message:

Trac: Move JavaScript logic for contributor labels into wp-trac.js.

Fixes #1326.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/trac.wordpress.org/templates/core/site-specific.html

    r1951 r1955  
    1414<div id="report-popup"></div>
    1515<script>
    16 (function($){
    17 var titles = {
     16var wpTracContributorLabels = {
    1817    matt: 'Project Lead',
    1918    markjaquith: 'Lead Developer',
     
    2423
    2524    ocean90: 'Core Committer',
    26     sergeybiryukov: 'Core Committer',
     25    SergeyBiryukov: 'Core Committer',
    2726    johnbillion: 'Core Committer',
    2827    pento: 'Core Committer',
     
    4443    iandstewart: 'Themes Committer',
    4544    karmatosed: 'Themes Committer',
    46     drewapicture: 'Docs Committer',
     45    DrewAPicture: 'Docs Committer',
    4746
    4847    ryan: 'Lead Developer',
     
    5251};
    5352
    54 $('h3.change .profile-link').each( function() {
    55     var el = $(this);
    56     user = el.attr('href').split('/').pop().toLowerCase();
    57     if ( user in titles ) {
    58         el.after( ' <span class="contributor-label">(' + titles[ user ] + ')</span>' );
    59     }
    60 });
    61 })(jQuery);
    6253</script>
    6354</body>
Note: See TracChangeset for help on using the changeset viewer.