Changeset 3795
- Timestamp:
- 08/09/2016 09:36:04 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
r3701 r3795 83 83 ) ); 84 84 85 // wp_enqueue_script( 'wporg-plugins-client', get_template_directory_uri() . '/js/theme.js', array(), false, true ); 86 wp_localize_script( 'wporg-plugins-client', 'app_data', array( 87 'api_url' => untrailingslashit( rest_url() ), 88 'nonce' => wp_create_nonce( 'wp_rest' ), 89 'base' => get_blog_details()->path, 90 ) ); 85 if ( isset( $_REQUEST['react'] ) ) { 86 wp_enqueue_script( 'wporg-plugins-client', get_template_directory_uri() . '/js/theme.js', array(), false, true ); 87 wp_localize_script( 'wporg-plugins-client', 'app_data', array( 88 'api_url' => untrailingslashit( rest_url() ), 89 'nonce' => wp_create_nonce( 'wp_rest' ), 90 'base' => get_blog_details()->path, 91 ) ); 92 } 91 93 92 94 }
Note: See TracChangeset
for help on using the changeset viewer.