Docs: Add missing documentation for various upgrade/install class properties and methods.
Props ramiy. Fixes #42923. Built from https://develop.svn.wordpress.org/trunk@48661 git-svn-id: http://core.svn.wordpress.org/trunk@48423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a745f035ab
commit
0dd2f9f5c5
|
@ -46,6 +46,9 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Action to perform before installing a plugin.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
public function before() {
|
public function before() {
|
||||||
if ( ! empty( $this->api ) ) {
|
if ( ! empty( $this->api ) ) {
|
||||||
|
@ -78,6 +81,9 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Action to perform following a plugin install.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
public function after() {
|
public function after() {
|
||||||
// Check if the plugin can be overwritten and output the HTML.
|
// Check if the plugin can be overwritten and output the HTML.
|
||||||
|
|
|
@ -16,12 +16,43 @@
|
||||||
* @see WP_Upgrader_Skin
|
* @see WP_Upgrader_Skin
|
||||||
*/
|
*/
|
||||||
class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
|
class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the plugin slug in the Plugin Directory.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
public $plugin = '';
|
public $plugin = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the plugin is active.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
public $plugin_active = false;
|
public $plugin_active = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the plugin is active for the entire network.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
public $plugin_network_active = false;
|
public $plugin_network_active = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $args
|
* Constructor.
|
||||||
|
*
|
||||||
|
* Sets up the plugin upgrader skin.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @param array $args Optional. The plugin upgrader skin arguments to
|
||||||
|
* override default options. Default empty array.
|
||||||
*/
|
*/
|
||||||
public function __construct( $args = array() ) {
|
public function __construct( $args = array() ) {
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
|
@ -41,6 +72,9 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Action to perform following a single plugin update.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
public function after() {
|
public function after() {
|
||||||
$this->plugin = $this->upgrader->plugin_info();
|
$this->plugin = $this->upgrader->plugin_info();
|
||||||
|
|
|
@ -46,6 +46,9 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Action to perform before installing a theme.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
public function before() {
|
public function before() {
|
||||||
if ( ! empty( $this->api ) ) {
|
if ( ! empty( $this->api ) ) {
|
||||||
|
@ -78,6 +81,9 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Action to perform following a single theme install.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
public function after() {
|
public function after() {
|
||||||
if ( $this->do_overwrite() ) {
|
if ( $this->do_overwrite() ) {
|
||||||
|
|
|
@ -16,10 +16,25 @@
|
||||||
* @see WP_Upgrader_Skin
|
* @see WP_Upgrader_Skin
|
||||||
*/
|
*/
|
||||||
class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
|
class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the theme slug in the Theme Directory.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
public $theme = '';
|
public $theme = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $args
|
* Constructor.
|
||||||
|
*
|
||||||
|
* Sets up the theme upgrader skin.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @param array $args Optional. The theme upgrader skin arguments to
|
||||||
|
* override default options. Default empty array.
|
||||||
*/
|
*/
|
||||||
public function __construct( $args = array() ) {
|
public function __construct( $args = array() ) {
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
|
@ -36,6 +51,9 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Action to perform following a single theme update.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
public function after() {
|
public function after() {
|
||||||
$this->decrement_update_count( 'theme' );
|
$this->decrement_update_count( 'theme' );
|
||||||
|
|
|
@ -22,6 +22,7 @@ class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin {
|
||||||
* Holds the WP_Error object.
|
* Holds the WP_Error object.
|
||||||
*
|
*
|
||||||
* @since 4.6.0
|
* @since 4.6.0
|
||||||
|
*
|
||||||
* @var null|WP_Error
|
* @var null|WP_Error
|
||||||
*/
|
*/
|
||||||
protected $errors = null;
|
protected $errors = null;
|
||||||
|
@ -29,9 +30,15 @@ class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin {
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
* Sets up the WordPress Ajax upgrader skin.
|
||||||
|
*
|
||||||
* @since 4.6.0
|
* @since 4.6.0
|
||||||
*
|
*
|
||||||
* @param array $args Options for the upgrader, see WP_Upgrader_Skin::__construct().
|
* @see WP_Upgrader_Skin::__construct()
|
||||||
|
*
|
||||||
|
* @param array $args Optional. The WordPress Ajax upgrader skin arguments to
|
||||||
|
* override default options. See WP_Upgrader_Skin::__construct().
|
||||||
|
* Default empty array.
|
||||||
*/
|
*/
|
||||||
public function __construct( $args = array() ) {
|
public function __construct( $args = array() ) {
|
||||||
parent::__construct( $args );
|
parent::__construct( $args );
|
||||||
|
|
|
@ -15,21 +15,60 @@
|
||||||
*/
|
*/
|
||||||
class WP_Upgrader_Skin {
|
class WP_Upgrader_Skin {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the upgrader data.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @var object
|
||||||
|
*/
|
||||||
public $upgrader;
|
public $upgrader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether header is done.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
public $done_header = false;
|
public $done_header = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether footer is done.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
public $done_footer = false;
|
public $done_footer = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the result of an upgrade.
|
* Holds the result of an upgrade.
|
||||||
*
|
*
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
|
*
|
||||||
* @var string|bool|WP_Error
|
* @var string|bool|WP_Error
|
||||||
*/
|
*/
|
||||||
public $result = false;
|
public $result = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds the options of an upgrade.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
public $options = array();
|
public $options = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $args
|
* Constructor.
|
||||||
|
*
|
||||||
|
* Sets up the generic skin for the WordPress Upgrader classes.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
|
*
|
||||||
|
* @param array $args Optional. The WordPress upgrader skin arguments to
|
||||||
|
* override default options. Default empty array.
|
||||||
*/
|
*/
|
||||||
public function __construct( $args = array() ) {
|
public function __construct( $args = array() ) {
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
|
@ -161,10 +200,16 @@ class WP_Upgrader_Skin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Action to perform before an update.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
public function before() {}
|
public function before() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Action to perform following an update.
|
||||||
|
*
|
||||||
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
public function after() {}
|
public function after() {}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-beta4-48660';
|
$wp_version = '5.5-beta4-48661';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue