Making WordPress.org

Changeset 7093


Ignore:
Timestamp:
04/11/2018 06:57:41 AM (6 years ago)
Author:
dd32
Message:

Trac: Append a version string to Trac's JavaScript/CSS files hosted on the w.org CDN.

This was previously enabled for meta.trac only as testing. It seems to have worked out well. Promoting to all Tracs.

Props ocean90.
See #3526.

File:
1 edited

Legend:

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

    r7089 r7093  
    55
    66<?python
    7     scripts_version = '95'
     7    scripts_version = '96'
    88    project_slug = req.environ['HTTP_HOST'].split(':')[0].split('.')[0]
    99    wporg_endpoint = 'https://make.wordpress.org/' + project_slug + '/'
     
    3838
    3939<!--! Append a version string to CSS files hosted on the w.org CDN -->
    40 <py:if test="project_slug == 'meta'">
    41     <py:match path="link[@rel='stylesheet' and starts-with(@href,'https://s.w.org/') and substring-after(@href,'.css') = '']">
    42         <link rel="stylesheet" href="${select('@href')}?v=${scripts_version}" />
    43     </py:match>
    44 </py:if>
     40<py:match path="link[@rel='stylesheet' and starts-with(@href,'https://s.w.org/') and substring-after(@href,'.css') = '']">
     41    <link rel="stylesheet" href="${select('@href')}?v=${scripts_version}" />
     42</py:match>
    4543
    4644<!--! Styles and such. Load before first JS file (jquery.js) -->
     
    6664
    6765<!--! Append a version string to JS files hosted on the w.org CDN -->
    68 <py:if test="project_slug == 'meta'">
    69     <py:match path="script[starts-with(@src,'https://s.w.org/') and substring-after(@src,'.js') = '']">
    70         <script src="${select('@src')}?v=${scripts_version}">${select('*|comment()|text()')}</script>
    71     </py:match>
    72 </py:if>
     66<py:match path="script[starts-with(@src,'https://s.w.org/') and substring-after(@src,'.js') = '']">
     67    <script src="${select('@src')}?v=${scripts_version}">${select('*|comment()|text()')}</script>
     68</py:match>
    7369
    7470<!--! Remove Trac logo and footer -->
Note: See TracChangeset for help on using the changeset viewer.