Making WordPress.org

Changeset 4327


Ignore:
Timestamp:
11/04/2016 05:04:01 AM (10 years ago)
Author:
tellyworth
Message:

Plugin Directory Theme: revert [4321] while I disentangle React.

See #1828

File:
1 edited

Legend:

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

    r4321 r4327  
    103103        }
    104104
    105         wp_enqueue_script( 'wporg-plugins-client', get_template_directory_uri() . '/js/theme.js', array(), false, true );
    106         wp_localize_script( 'wporg-plugins-client', 'app_data', array(
    107                 'api_url' => untrailingslashit( rest_url() ),
    108                 'nonce'   => wp_create_nonce( 'wp_rest' ),
    109                 'base'    => get_blog_details()->path,
    110         ) );
     105        if ( isset( $_REQUEST['react'] ) ) {
     106                wp_enqueue_script( 'wporg-plugins-client', get_template_directory_uri() . '/js/theme.js', array(), false, true );
     107                wp_localize_script( 'wporg-plugins-client', 'app_data', array(
     108                        'api_url' => untrailingslashit( rest_url() ),
     109                        'nonce'   => wp_create_nonce( 'wp_rest' ),
     110                        'base'    => get_blog_details()->path,
     111                ) );
     112        }
    111113
    112114}
Note: See TracChangeset for help on using the changeset viewer.