Changeset 6654 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php
- Timestamp:
- 02/16/2018 05:26:57 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php
r6652 r6654 70 70 71 71 /** 72 * Enqueue scripts and styles. 73 */ 74 function scripts() { 75 wp_enqueue_script( 'google-charts', 'https://www.gstatic.com/charts/loader.js', [], null, true ); 76 wp_enqueue_script( 'wporg-page-stats', get_theme_file_uri( '/js/page-stats.js' ), [ 'jquery', 'google-charts'], 1, true ); 77 wp_localize_script( 'wporg-page-stats', 'wporgPageStats', [ 78 'trunk' => number_format( WP_CORE_STABLE_BRANCH + 0.1, 1 ), /* trunk */ 79 'beta' => number_format( WP_CORE_STABLE_BRANCH + 0.2, 1 ), /* trunk w/ beta-tester plugin */ 80 'wpVersions' => ___( 'WordPress Version', 'wporg' ), 81 'phpVersions' => ___( 'PHP Versions', 'wporg' ), 82 'mysqlVersions' => ___( 'MySQL Version', 'wporg' ), 83 'locales' => ___( 'Locales', 'wporg' ), 84 ] ); 85 } 86 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\scripts' ); 87 88 /** 72 89 * Extend the default WordPress body classes. 73 90 *
Note: See TracChangeset
for help on using the changeset viewer.