Changeset 2543
- Timestamp:
- 02/22/2016 07:37:47 PM (8 years ago)
- Location:
- sites/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-specifics.php
r2167 r2543 14 14 $this->add_filter( 'projects', array( 'args' => 2 ) ); 15 15 $this->add_action( 'before_request', array( 'args' => 2 ) ); 16 $this->add_action( 'project_created' ); 17 $this->add_action( 'project_saved' ); 18 } 19 20 function project_created() { 21 $this->update_projects_last_updated(); 22 } 23 24 function project_saved() { 25 $this->update_projects_last_updated(); 26 } 27 28 /** 29 * Stores the timestamp of the last update for projects. 30 * 31 * Used by the Rosetta Roles plugin to invalidate local caches. 32 */ 33 function update_projects_last_updated() { 34 gp_update_option( 'wporg_projects_last_updated', time() ); 16 35 } 17 36 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/wporg-gp-customizations.php
r2275 r2543 15 15 add_filter( 'gp_projects', array( $this, 'natural_sort_projects' ), 10, 2 ); 16 16 add_action( 'gp_before_request', array( $this, 'disable_translation_propagation_on_import' ), 10, 2 ); 17 add_action( 'gp_project_created', array( $this, 'update_projects_last_updated' ) ); 18 add_action( 'gp_project_saved', array( $this, 'update_projects_last_updated' ) ); 19 } 20 21 /** 22 * Stores the timestamp of the last update for projects. 23 * 24 * Used by the Rosetta Roles plugin to invalidate local caches. 25 */ 26 public function update_projects_last_updated() { 27 update_option( 'wporg_projects_last_updated', time() ); 17 28 } 18 29
Note: See TracChangeset
for help on using the changeset viewer.