Upgrader: Introduce a new action hook `pre_auto_update`, which fires immediately prior to an auto-update for core, themes, plugins, or translations.

Props DavidAnderson, welcher.
Fixes #30441.

Built from https://develop.svn.wordpress.org/trunk@35144


git-svn-id: http://core.svn.wordpress.org/trunk@35110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2015-10-13 18:58:25 +00:00
parent 4ef12c7814
commit 57e69d4a3f
2 changed files with 13 additions and 1 deletions

View File

@ -2854,6 +2854,18 @@ class WP_Automatic_Updater {
if ( ! $this->should_update( $type, $item, $context ) )
return false;
/**
* Fires immediately prior to an auto-update.
*
* @since 4.4.0
*
* @param string $type The type of update being checked: 'core', 'theme', 'plugin', or 'translation'.
* @param object $item The update offer.
* @param string $context The filesystem context (a path) against which filesystem access and status
* should be checked.
*/
do_action( 'pre_auto_update', $type, $item, $context );
$upgrader_item = $item;
switch ( $type ) {
case 'core':

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-35143';
$wp_version = '4.4-alpha-35144';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.