Commit ee3e920e authored by Sergey Biryukov's avatar Sergey Biryukov
Browse files

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: https://core.svn.wordpress.org/trunk@48423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 6f920e36
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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() {
		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() {
		// Check if the plugin can be overwritten and output the HTML.
+37 −3
Original line number Diff line number Diff line
@@ -16,12 +16,43 @@
 * @see 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 = '';

	/**
	 * Whether the plugin is active.
	 *
	 * @since 2.8.0
	 *
	 * @var bool
	 */
	public $plugin_active = false;

	/**
	 * Whether the plugin is active for the entire network.
	 *
	 * @since 2.8.0
	 *
	 * @var bool
	 */
	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() ) {
		$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() {
		$this->plugin = $this->upgrader->plugin_info();
+6 −0
Original line number Diff line number Diff line
@@ -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() {
		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() {
		if ( $this->do_overwrite() ) {
+19 −1
Original line number Diff line number Diff line
@@ -16,10 +16,25 @@
 * @see 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 = '';

	/**
	 * @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() ) {
		$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() {
		$this->decrement_update_count( 'theme' );
+8 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin {
	 * Holds the WP_Error object.
	 *
	 * @since 4.6.0
	 *
	 * @var null|WP_Error
	 */
	protected $errors = null;
@@ -29,9 +30,15 @@ class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin {
	/**
	 * Constructor.
	 *
	 * Sets up the WordPress Ajax upgrader skin.
	 *
	 * @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() ) {
		parent::__construct( $args );
Loading