Making WordPress.org


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

Main: Use minified scripts.

See #3673.

File:
1 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}
Note: See TracChangeset for help on using the changeset viewer.