Changeset 5024 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
- Timestamp:
- 03/01/2017 06:08:54 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
r4505 r5024 77 77 wp_enqueue_script( 'google-jsapi', 'https://www.google.com/jsapi', array(), false, true ); 78 78 wp_enqueue_script( 'wporg-plugins-stats', get_template_directory_uri() . '/js/stats.js', array( 'jquery', 'google-jsapi' ), '20161019', true ); 79 80 79 81 80 wp_localize_script( 'wporg-plugins-stats', 'pluginStats', array( … … 91 90 ), 92 91 ) ); 93 94 92 } 95 93 … … 97 95 if ( is_single() ) { 98 96 wp_enqueue_script( 'wporg-plugins-client', get_template_directory_uri() . '/js/theme.js', array(), false, true ); 99 wp_localize_script( 'wporg-plugins-client', 'app_data', array( 100 'api_url' => untrailingslashit( rest_url() ), 101 'nonce' => wp_create_nonce( 'wp_rest' ), 102 'base' => get_blog_details()->path, 97 wp_localize_script( 'wporg-plugins-client', 'pluginDirectory', array( 98 'endpoint' => untrailingslashit( rest_url() ), // 'https://wordpress.org/plugins-wp/wp-json', 99 'nonce' => wp_create_nonce( 'wp_rest' ), 100 'base' => get_blog_details()->path, 101 'userId' => get_current_user_id(), 102 ) ); 103 wp_localize_script( 'wporg-plugins-client', 'localeData', array( 104 '' => array( 105 'Plural-Forms' => _x( 'nplurals=2; plural=n != 1;', 'plural forms', 'wporg-plugins' ), 106 'Language' => _x( 'en', 'language (fr, fr_CA)', 'wporg-plugins' ), 107 'localeSlug' => _x( 'en', 'locale slug', 'wporg-plugins' ) , 108 ), 103 109 ) ); 104 110 }
Note: See TracChangeset
for help on using the changeset viewer.