Making WordPress.org

Changeset 2947


Ignore:
Timestamp:
04/13/2016 02:43:55 PM (8 years ago)
Author:
ocean90
Message:

Translate: Remove extra handling for translation imports. Propagation no longer part of GlotPress.

See #1667.

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  
    1414        add_filter( 'gp_url_profile', array( $this, 'worg_profile_url' ), 10, 2 );
    1515        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 );
    1716        add_action( 'gp_project_created', array( $this, 'update_projects_last_updated' ) );
    1817        add_action( 'gp_project_saved', array( $this, 'update_projects_last_updated' ) );
     
    4140    public function update_projects_last_updated() {
    4241        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         }
    5542    }
    5643
Note: See TracChangeset for help on using the changeset viewer.