mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
WordPress Core Automatic Updates: Pass the Filesystem path as $context to request_filesystem_credentials(). See #22704
Built from https://develop.svn.wordpress.org/trunk@25422 git-svn-id: http://core.svn.wordpress.org/trunk@25347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4678d33216
commit
89682d2013
@ -541,7 +541,9 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||
class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||
var $messages = array();
|
||||
|
||||
function request_filesystem_credentials( $error = false ) {
|
||||
function request_filesystem_credentials( $error = false, $context = '' ) {
|
||||
if ( $context )
|
||||
$this->options['context'] = $context;
|
||||
// TODO: fix up request_filesystem_credentials(), or split it, to allow us to request a no-output version
|
||||
// This will output a credentials form in event of failure, We don't want that, so just hide with a buffer
|
||||
ob_start();
|
||||
|
@ -1352,7 +1352,7 @@ class WP_Automatic_Upgrader {
|
||||
static function can_auto_update( $context ) {
|
||||
if ( ! self::$skin )
|
||||
self::$skin = new Automatic_Upgrader_Skin();
|
||||
return (bool) self::$skin->request_filesystem_credentials();
|
||||
return (bool) self::$skin->request_filesystem_credentials( false, $context );
|
||||
}
|
||||
|
||||
static function upgrade( $type, $item ) {
|
||||
|
Loading…
Reference in New Issue
Block a user