WordPress.org

Making WordPress.org

Changeset 7432


Ignore:
Timestamp:
07/11/2018 09:57:21 PM (2 years ago)
Author:
obenland
Message:

Main: Use minified scripts.

See #3673.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php

    r7430 r7432  
    6666 */
    6767function scripts() {
     68    $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     69
    6870    wp_enqueue_style( 'wporg-style', get_theme_file_uri( '/css/style.css' ), [ 'dashicons', 'open-sans' ], '20180711' );
    6971    wp_style_add_data( 'wporg-style', 'rtl', 'replace' );
     
    9597
    9698    if ( is_page() && get_queried_object()->post_parent ) {
    97         wp_enqueue_script( 'wporg-navigation', get_theme_file_uri( '/js/navigation.js' ), [], '20151215', true );
     99        wp_enqueue_script( 'wporg-navigation', get_theme_file_uri( "/js/navigation$suffix.js" ), [], '20151215', true );
    98100    }
    99101}
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-download-counter.php

    r7411 r7432  
    210210    </div>
    211211
    212     <script type="text/javascript" src="//code.jquery.com/jquery-latest.js"></script>
     212    <script type="text/javascript" src="//code.jquery.com/jquery-latest.min.js"></script>
    213213    <script type="text/javascript">
    214214        jQuery( function( $ ) {
Note: See TracChangeset for help on using the changeset viewer.