Request FTP and SSH credentials when needed during shiny updates
This is a restoration of [31749] which was reverted in [31755]. It includes a number of enhancements from the original version. Namely: * Not doing a credential check in src/wp-includes/script-loader.php * Add new function `wp_print_request_filesystem_credentials_modal` * update the version number in the list table when a plugin is updated UI still needs further work, but this basic version should enable more testing Props ericlewis, jorbin See #31528 Built from https://develop.svn.wordpress.org/trunk@31811 git-svn-id: http://core.svn.wordpress.org/trunk@31793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1192,3 +1192,29 @@ submit_button( __( 'Proceed' ), 'button', 'upgrade' );
|
||||
<?php
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the credentials modal when needed
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
function wp_print_request_filesystem_credentials_modal() {
|
||||
$filesystem_method = get_filesystem_method();
|
||||
ob_start();
|
||||
$filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() );
|
||||
ob_end_clean();
|
||||
$request_filesystem_credentials = ( $filesystem_method != 'direct' && ! $filesystem_credentials_are_stored );
|
||||
if ( ! $request_filesystem_credentials ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div id="request-filesystem-credentials-dialog" class="notification-dialog-wrap request-filesystem-credentials-dialog">
|
||||
<div class="notification-dialog-background"></div>
|
||||
<div class="notification-dialog">
|
||||
<div class="request-filesystem-credentials-dialog-content">
|
||||
<?php request_filesystem_credentials( site_url() ); ?>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user