Changeset 4327 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
- Timestamp:
- 11/04/2016 05:04:01 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
r4321 r4327 103 103 } 104 104 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 } 111 113 112 114 }
Note: See TracChangeset
for help on using the changeset viewer.