WordPress.org

Make WordPress Core

Ticket #29230: 29230.patch

File 29230.patch, 1.1 KB (added by ocean90, 5 years ago)
  • src/wp-admin/includes/class-wp-upgrader.php

     
    12561256                if ( 'upgrader_process_complete' == current_filter() )
    12571257                        $this->skin->feedback( 'starting_upgrade' );
    12581258
    1259                 add_filter( 'upgrader_source_selection', array( &$this, 'check_package' ), 10, 3 );
     1259                // Remove any existing package checks and then set the new one for translations
     1260                remove_all_filters( 'upgrader_source_selection' );
     1261                add_filter( 'upgrader_source_selection', array( $this, 'check_package' ), 10, 2 );
    12601262
    12611263                $this->skin->header();
    12621264
     
    13201322                $this->skin->footer();
    13211323
    13221324                // Clean up our hooks, in case something else does an upgrade on this connection.
    1323                 remove_filter( 'upgrader_source_selection', array( &$this, 'check_package' ), 10, 2 );
     1325                remove_filter( 'upgrader_source_selection', array( $this, 'check_package' ), 10 );
    13241326
    13251327                if ( $parsed_args['clear_update_cache'] ) {
    13261328                        wp_clean_themes_cache( true );