Changeset 2953
- Timestamp:
- 04/14/2016 09:56:42 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/wporg-gp-customizations.php
r2947 r2953 17 17 add_action( 'gp_project_saved', array( $this, 'update_projects_last_updated' ) ); 18 18 add_filter( 'pre_handle_404', array( $this, 'short_circuit_handle_404' ) ); 19 add_action( 'wp_default_scripts', array( $this, 'bump_script_versions' ) ); 20 } 21 22 /** 23 * Changes the versions of some default scripts for cache bust. 24 * 25 * @see https://wordpress.slack.com/archives/meta-i18n/p1460626195000251 26 * 27 * @param WP_Scripts &$scripts WP_Scripts instance, passed by reference. 28 */ 29 public function bump_script_versions( &$scripts ) { 30 foreach ( [ 'gp-editor', 'gp-glossary' ] as $handle ) { 31 if ( isset( $scripts->registered[ $handle ] ) && '20160329' === $scripts->registered[ $handle ]->ver ) { 32 $scripts->registered[ $handle ]->ver = '20160329a'; 33 } 34 } 19 35 } 20 36
Note: See TracChangeset
for help on using the changeset viewer.