case 'theme':
$upgrader =
new Theme_Upgrader( $skin );
$context =
get_theme_root( $item->theme
);
break;
case 'translation':
$upgrader =
new Language_Pack_Upgrader( $skin );
$context = WP_CONTENT_DIR; // WP_LANG_DIR;
break;
} // Determine whether we can and should perform this update.
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.
*/