Changeset 2947
- Timestamp:
- 04/13/2016 02:43:55 PM (8 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
r2884 r2947 14 14 add_filter( 'gp_url_profile', array( $this, 'worg_profile_url' ), 10, 2 ); 15 15 add_filter( 'gp_projects', array( $this, 'natural_sort_projects' ), 10, 2 ); 16 add_action( 'gp_before_request', array( $this, 'disable_translation_propagation_on_import' ), 10, 2 );17 16 add_action( 'gp_project_created', array( $this, 'update_projects_last_updated' ) ); 18 17 add_action( 'gp_project_saved', array( $this, 'update_projects_last_updated' ) ); … … 41 40 public function update_projects_last_updated() { 42 41 update_option( 'wporg_projects_last_updated', time() ); 43 }44 45 /**46 * Disables propagation of translations on translation imports by users.47 *48 * @param string $class_name Class name of route handler.49 * @param string $last_method_called Method name of route handler.50 */51 public function disable_translation_propagation_on_import( $class_name, $last_method_called ) {52 if ( 'GP_Route_Translation' === $class_name && 'import_translations_post' === $last_method_called ) {53 add_filter( 'gp_enable_propagate_translations_across_projects', '__return_false' );54 }55 42 } 56 43
Note: See TracChangeset
for help on using the changeset viewer.