Changeset 2884
- Timestamp:
- 04/03/2016 12:09:54 PM (10 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
r2733 r2884 17 17 add_action( 'gp_project_created', array( $this, 'update_projects_last_updated' ) ); 18 18 add_action( 'gp_project_saved', array( $this, 'update_projects_last_updated' ) ); 19 add_filter( 'pre_handle_404', array( $this, 'short_circuit_handle_404' ) ); 20 } 21 22 /** 23 * Short circuits WordPress' status handler to prevent unnecessary headers 24 * which prevent caching. 25 * 26 * @return bool True if a request for GlotPress, false if not. 27 */ 28 public function short_circuit_handle_404() { 29 if ( is_glotpress() ) { 30 return true; 31 } 32 33 return false; 19 34 } 20 35
Note: See TracChangeset
for help on using the changeset viewer.