Making WordPress.org


Ignore:
Timestamp:
11/01/2017 07:37:50 PM (7 years ago)
Author:
obenland
Message:

Main: Performance improvements

Added footer styles to one day remove wp4.css
Removed some unneeded resources
Switched to using optimized images for front page.

See #2861.

File:
1 edited

Legend:

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

    r6058 r6068  
    7676    wp_enqueue_style( 'wporg-style', get_stylesheet_directory_uri() . "/css/style{$suffix}.css" );
    7777
    78     wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
     78    //wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
    7979    wp_enqueue_script( 'wporg-plugins-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
    8080
    81     if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
     81    if ( ! is_front_page() && is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    8282        wp_enqueue_script( 'comment-reply' );
    8383    }
     84
     85    // No Jetpack scripts needed.
     86    add_filter( 'jetpack_implode_frontend_css', '__return_false' );
     87    wp_dequeue_script( 'devicepx' );
     88
     89    /*
     90     * No Grofiles needed.
     91     *
     92     * Enqueued so that it's overridden in the global footer.
     93     */
     94    wp_register_script( 'grofiles-cards', false );
     95    wp_enqueue_script( 'grofiles-cards' );
    8496}
    8597add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\scripts' );
Note: See TracChangeset for help on using the changeset viewer.