do_action( 'pre_auto_update',
$type,
$item,
$context );
$upgrader_item =
$item;
switch ( $type ) { case 'core':
/* translators: %s: WordPress version. */
$skin->
feedback( __( 'Updating to WordPress %s'
),
$item->version
);
/* translators: %s: WordPress version. */
$item_name =
sprintf( __( 'WordPress %s'
),
$item->version
);
break;
case 'theme':
$upgrader_item =
$item->theme;
$theme =
wp_get_theme( $upgrader_item );
$item_name =
$theme->
Get( 'Name'
);
// Add the current version so that it can be reported in the notification email.
$item->current_version =
$theme->
get( 'Version'
);
if ( empty( $item->current_version
) ) { $item->current_version = false;
}