WordPress.org

Make WordPress Core

Changeset 38475


Ignore:
Timestamp:
08/31/2016 06:11:56 PM (3 years ago)
Author:
jeremyfelt
Message:

Upgrade/Install: After [37687], fix the number of params passed to the upgrade hooks.

wp_version_check(), wp_update_plugins() and wp_update_themes() are all originally hooked to the upgrader_process_complete action with zero arguments passed to them. Zero arguments should be passed when re-adding them after translation updates, otherwise the sky will fall.

Merge of [38415] to the 4.6 branch.

Props ionutst, gitlost, swissspidy.
Fixes #37731.

Location:
branches/4.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.6

  • branches/4.6/src/wp-admin/includes/class-language-pack-upgrader.php

    r37687 r38475  
    283283        // Re-add upgrade hooks.
    284284        add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
    285         add_action( 'upgrader_process_complete', 'wp_version_check' );
    286         add_action( 'upgrader_process_complete', 'wp_update_plugins' );
    287         add_action( 'upgrader_process_complete', 'wp_update_themes' );
     285        add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );
     286        add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
     287        add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
    288288
    289289        $this->skin->bulk_footer();
Note: See TracChangeset for help on using the changeset viewer.