/*
* Allow relaxed file ownership writes for User-initiated upgrades when the API specifies
* that it's safe to do so. This only happens when there are no new files to create.
*/
$allow_relaxed_file_ownership = !
$reinstall &&
isset( $update->new_files
) && !
$update->new_files;
?>
<div class="wrap">
<h1><?php
_e( 'Update WordPress'
); ?></h1>
<?php
$credentials =
request_filesystem_credentials( $url, '', false, ABSPATH, array
( 'version', 'locale'
),
$allow_relaxed_file_ownership );
if ( false ===
$credentials ) { echo '</div>';
return;
} if ( !
WP_Filesystem( $credentials, ABSPATH,
$allow_relaxed_file_ownership ) ) { // Failed to connect. Error and request again.
request_filesystem_credentials( $url, '', true, ABSPATH, array
( 'version', 'locale'
),
$allow_relaxed_file_ownership );
echo '</div>';
return;
}