Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break Automattic_Developer_Empty_Upgrader_Skin out into an includes file
- Loading branch information
1 parent
2d83d77
commit eeb1683
Showing
2 changed files
with
32 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); | ||
|
||
class Automattic_Developer_Empty_Upgrader_Skin extends WP_Upgrader_Skin { | ||
function __construct($args = array()) { | ||
$defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' ); | ||
$args = wp_parse_args( $args, $defaults ); | ||
|
||
$this->type = $args['type']; | ||
$this->api = isset( $args['api'] ) ? $args['api'] : array(); | ||
|
||
parent::__construct( $args ); | ||
} | ||
|
||
public function request_filesystem_credentials() { | ||
return true; | ||
} | ||
|
||
public function error() { | ||
die( '-1' ); | ||
} | ||
|
||
public function header() {} | ||
public function footer() {} | ||
public function feedback() {} | ||
} |