Making WordPress.org

Changeset 4397


Ignore:
Timestamp:
11/21/2016 10:25:27 PM (10 years ago)
Author:
tellyworth
Message:

Plugin directory: don't load React on pages where it is not needed.

File:
1 edited

Legend:

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

    r4391 r4397  
    9393        }
    9494
    95         if ( !isset( $_REQUEST['noreact'] ) ) {
     95        // React is currently only used on detail pages
     96        if ( is_single() ) {
    9697                wp_enqueue_script( 'wporg-plugins-client', get_template_directory_uri() . '/js/theme.js', array(), false, true );
    9798                wp_localize_script( 'wporg-plugins-client', 'app_data', array(
Note: See TracChangeset for help on using the changeset viewer.