diff --git a/src/wp-admin/includes/class-wp-upgrader-skins.php b/src/wp-admin/includes/class-wp-upgrader-skins.php
index 942542e08f..0c6426c230 100644
--- a/src/wp-admin/includes/class-wp-upgrader-skins.php
+++ b/src/wp-admin/includes/class-wp-upgrader-skins.php
@@ -22,6 +22,10 @@ class WP_Upgrader_Skin {
public $result = false;
public $options = array();
+ /**
+ *
+ * @param array $args
+ */
public function __construct($args = array()) {
$defaults = array( 'url' => '', 'nonce' => '', 'title' => '', 'context' => false );
$this->options = wp_parse_args($args, $defaults);
@@ -43,6 +47,13 @@ class WP_Upgrader_Skin {
$this->result = $result;
}
+ /**
+ *
+ * @param bool $error
+ * @param string $context
+ * @param bool $allow_relaxed_file_ownership
+ * @return type
+ */
public function request_filesystem_credentials( $error = false, $context = false, $allow_relaxed_file_ownership = false ) {
$url = $this->options['url'];
if ( ! $context ) {
@@ -73,6 +84,10 @@ class WP_Upgrader_Skin {
echo '';
}
+ /**
+ *
+ * @param string|WP_Error $errors
+ */
public function error($errors) {
if ( ! $this->done_header )
$this->header();
@@ -88,6 +103,10 @@ class WP_Upgrader_Skin {
}
}
+ /**
+ *
+ * @param string $string
+ */
public function feedback($string) {
if ( isset( $this->upgrader->strings[$string] ) )
$string = $this->upgrader->strings[$string];
@@ -154,7 +173,11 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
public $plugin_active = false;
public $plugin_network_active = false;
- public function __construct($args = array()) {
+ /**
+ *
+ * @param array $args
+ */
+ public function __construct( $args = array() ) {
$defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Update Plugin') );
$args = wp_parse_args($args, $defaults);
@@ -210,6 +233,10 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
*/
public $error = false;
+ /**
+ *
+ * @param array $args
+ */
public function __construct($args = array()) {
$defaults = array( 'url' => '', 'nonce' => '' );
$args = wp_parse_args($args, $defaults);
@@ -256,6 +283,11 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
public function footer() {
// Nothing, This will be displayed within a iframe.
}
+
+ /**
+ *
+ * @param string|WP_Error $error
+ */
public function error($error) {
if ( is_string($error) && isset( $this->upgrader->strings[$error] ) )
$this->error = $this->upgrader->strings[$error];
@@ -281,6 +313,10 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
$this->feedback('skin_upgrade_end');
}
+ /**
+ *
+ * @param string $title
+ */
public function before($title = '') {
$this->in_loop = true;
printf( '
' . $this->upgrader->strings['skin_before_update_header'] . '
', $title, $this->upgrader->update_current, $this->upgrader->update_count);
@@ -289,6 +325,10 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
$this->flush_output();
}
+ /**
+ *
+ * @param string $title
+ */
public function after($title = '') {
echo '';
if ( $this->error || ! $this->result ) {
@@ -328,10 +368,18 @@ class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin {
$this->upgrader->strings['skin_before_update_header'] = __('Updating Plugin %1$s (%2$d/%3$d)');
}
+ /**
+ *
+ * @param string $title
+ */
public function before($title = '') {
parent::before($this->plugin_info['Title']);
}
+ /**
+ *
+ * @param string $title
+ */
public function after($title = '') {
parent::after($this->plugin_info['Title']);
$this->decrement_update_count( 'plugin' );
@@ -368,10 +416,18 @@ class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin {
$this->upgrader->strings['skin_before_update_header'] = __('Updating Theme %1$s (%2$d/%3$d)');
}
+ /**
+ *
+ * @param string $title
+ */
public function before($title = '') {
parent::before( $this->theme_info->display('Name') );
}
+ /**
+ *
+ * @param string $title
+ */
public function after($title = '') {
parent::after( $this->theme_info->display('Name') );
$this->decrement_update_count( 'theme' );
@@ -412,6 +468,10 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin {
public $api;
public $type;
+ /**
+ *
+ * @param array $args
+ */
public function __construct($args = array()) {
$defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' );
$args = wp_parse_args($args, $defaults);
@@ -488,6 +548,10 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
public $api;
public $type;
+ /**
+ *
+ * @param array $args
+ */
public function __construct($args = array()) {
$defaults = array( 'type' => 'web', 'url' => '', 'theme' => '', 'nonce' => '', 'title' => '' );
$args = wp_parse_args($args, $defaults);
@@ -572,6 +636,10 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
public $theme = '';
+ /**
+ *
+ * @param array $args
+ */
public function __construct($args = array()) {
$defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Update Theme') );
$args = wp_parse_args($args, $defaults);
@@ -649,6 +717,10 @@ class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin {
public $done_footer = false;
public $display_footer_actions = true;
+ /**
+ *
+ * @param array $args
+ */
public function __construct( $args = array() ) {
$defaults = array( 'url' => '', 'nonce' => '', 'title' => __( 'Update Translations' ), 'skip_header_footer' => false );
$args = wp_parse_args( $args, $defaults );
@@ -668,6 +740,10 @@ class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin {
printf( '' . __( 'Updating translations for %1$s (%2$s)…' ) . '
', $name, $this->language_update->language );
}
+ /**
+ *
+ * @param string|WP_Error $error
+ */
public function error( $error ) {
echo '';
parent::error( $error );
@@ -710,6 +786,13 @@ class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin {
class Automatic_Upgrader_Skin extends WP_Upgrader_Skin {
protected $messages = array();
+ /**
+ *
+ * @param bool $error
+ * @param string $context
+ * @param bool $allow_relaxed_file_ownership
+ * @return bool
+ */
public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) {
if ( $context ) {
$this->options['context'] = $context;
diff --git a/src/wp-admin/includes/class-wp-upgrader.php b/src/wp-admin/includes/class-wp-upgrader.php
index 1f2b1f740f..0956223808 100644
--- a/src/wp-admin/includes/class-wp-upgrader.php
+++ b/src/wp-admin/includes/class-wp-upgrader.php
@@ -1063,6 +1063,12 @@ class Plugin_Upgrader extends WP_Upgrader {
* @since 2.8.0
*
* @global WP_Filesystem_Base $wp_filesystem Subclass
+ *
+ * @param bool|WP_Error $removed
+ * @param string $local_destination
+ * @param string $remote_destination
+ * @param array $plugin
+ * @return WP_Error|bool
*/
public function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) {
global $wp_filesystem;
@@ -1166,6 +1172,11 @@ class Theme_Upgrader extends WP_Upgrader {
* Hooked to the {@see 'upgrader_post_install'} filter by {@see Theme_Upgrader::install()}.
*
* @since 3.4.0
+ *
+ * @param bool $install_result
+ * @param array $hook_extra
+ * @param array $child_result
+ * @return type
*/
public function check_parent_theme_filter( $install_result, $hook_extra, $child_result ) {
// Check to see if we need to install a parent theme
@@ -1236,6 +1247,7 @@ class Theme_Upgrader extends WP_Upgrader {
* @since 3.4.0
*
* @param array $actions Preview actions.
+ * @return array
*/
public function hide_activate_preview_actions( $actions ) {
unset($actions['activate'], $actions['preview']);
@@ -1524,9 +1536,12 @@ class Theme_Upgrader extends WP_Upgrader {
* {@see Theme_Upgrader::bulk_upgrade()}.
*
* @since 2.8.0
+ *
+ * @param bool|WP_Error $return
+ * @param array $theme
+ * @return bool|WP_Error
*/
public function current_before($return, $theme) {
-
if ( is_wp_error($return) )
return $return;
@@ -1548,6 +1563,10 @@ class Theme_Upgrader extends WP_Upgrader {
* and {@see Theme_Upgrader::bulk_upgrade()}.
*
* @since 2.8.0
+ *
+ * @param bool|WP_Error $return
+ * @param array $theme
+ * @return bool|WP_Error
*/
public function current_after($return, $theme) {
if ( is_wp_error($return) )
@@ -1580,6 +1599,12 @@ class Theme_Upgrader extends WP_Upgrader {
* @since 2.8.0
*
* @global WP_Filesystem_Base $wp_filesystem Subclass
+ *
+ * @param bool $removed
+ * @param string $local_destination
+ * @param string $remote_destination
+ * @param array $theme
+ * @return bool
*/
public function delete_old_theme( $removed, $local_destination, $remote_destination, $theme ) {
global $wp_filesystem;
@@ -1658,6 +1683,8 @@ class Language_Pack_Upgrader extends WP_Upgrader {
* @since 3.7.0
*
* @static
+ *
+ * @param false|WP_Upgrader $upgrader
*/
public static function async_upgrade( $upgrader = false ) {
// Avoid recursion.
@@ -1880,6 +1907,9 @@ class Language_Pack_Upgrader extends WP_Upgrader {
* @since 3.7.0
*
* @global WP_Filesystem_Base $wp_filesystem Subclass
+ *
+ * @param string|WP_Error $source
+ * @param string $remote_source
*/
public function check_package( $source, $remote_source ) {
global $wp_filesystem;
@@ -1911,7 +1941,7 @@ class Language_Pack_Upgrader extends WP_Upgrader {
*
* @since 3.7.0
*
- * @param object The data for an update.
+ * @param object $update The data for an update.
* @return string The name of the item being updated.
*/
public function get_name_for_update( $update ) {
@@ -2620,6 +2650,8 @@ class WP_Automatic_Updater {
*
* @param string $type The type of update being checked: 'core', 'theme', 'plugin', 'translation'.
* @param object $item The update offer.
+ *
+ * @return null|WP_Error
*/
public function update( $type, $item ) {
$skin = new Automatic_Upgrader_Skin;
@@ -2858,7 +2890,7 @@ class WP_Automatic_Updater {
*
* @global string $wp_version
*
- * @param object $update_result The result of the core update. Includes the update offer and result.
+ * @param object|WP_Error $update_result The result of the core update. Includes the update offer and result.
*/
protected function after_core_update( $update_result ) {
global $wp_version;
diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php
index 80255bb6a8..18702b32aa 100644
--- a/src/wp-admin/includes/dashboard.php
+++ b/src/wp-admin/includes/dashboard.php
@@ -168,6 +168,11 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_
add_meta_box( $widget_id, $widget_name, $callback, $screen, $location, $priority, $callback_args );
}
+/**
+ *
+ * @param type $dashboard
+ * @param type $meta_box
+ */
function _wp_dashboard_control_callback( $dashboard, $meta_box ) {
echo '