Docs: Fix a variety of inline documentation syntax issues and add some strategic spacing.

Fixes #29086.

Built from https://develop.svn.wordpress.org/trunk@33685


git-svn-id: http://core.svn.wordpress.org/trunk@33652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2015-08-21 04:13:24 +00:00
parent 3bb87e08e4
commit 416df545ba
2 changed files with 24 additions and 16 deletions

View File

@ -436,6 +436,7 @@ class WP_Upgrader {
* @param array $hook_extra Extra arguments passed to hooked filters. * @param array $hook_extra Extra arguments passed to hooked filters.
*/ */
$res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] ); $res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );
if ( is_wp_error( $res ) ) { if ( is_wp_error( $res ) ) {
return $res; return $res;
} }
@ -466,6 +467,7 @@ class WP_Upgrader {
* @param WP_Upgrader $this WP_Upgrader instance. * @param WP_Upgrader $this WP_Upgrader instance.
*/ */
$source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this ); $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this );
if ( is_wp_error( $source ) ) { if ( is_wp_error( $source ) ) {
return $source; return $source;
} }
@ -474,6 +476,7 @@ class WP_Upgrader {
if ( $source !== $remote_source ) { if ( $source !== $remote_source ) {
$source_files = array_keys( $wp_filesystem->dirlist( $source ) ); $source_files = array_keys( $wp_filesystem->dirlist( $source ) );
} }
/* /*
* Protection against deleting files in any important base directories. * Protection against deleting files in any important base directories.
* Theme_Upgrader & Plugin_Upgrader also trigger this, as they pass the * Theme_Upgrader & Plugin_Upgrader also trigger this, as they pass the
@ -486,13 +489,14 @@ class WP_Upgrader {
if ( is_array( $wp_theme_directories ) ) { if ( is_array( $wp_theme_directories ) ) {
$protected_directories = array_merge( $protected_directories, $wp_theme_directories ); $protected_directories = array_merge( $protected_directories, $wp_theme_directories );
} }
if ( in_array( $destination, $protected_directories ) ) { if ( in_array( $destination, $protected_directories ) ) {
$remote_destination = trailingslashit( $remote_destination ) . trailingslashit( basename( $source ) ); $remote_destination = trailingslashit( $remote_destination ) . trailingslashit( basename( $source ) );
$destination = trailingslashit( $destination ) . trailingslashit( basename( $source ) ); $destination = trailingslashit( $destination ) . trailingslashit( basename( $source ) );
} }
if ( $clear_destination ) { if ( $clear_destination ) {
// We're going to clear the destination if there's something there // We're going to clear the destination if there's something there.
$this->skin->feedback('remove_old'); $this->skin->feedback('remove_old');
$removed = $this->clear_destination( $remote_destination ); $removed = $this->clear_destination( $remote_destination );
@ -600,7 +604,6 @@ class WP_Upgrader {
* @type array $hook_extra Extra arguments to pass to the filter hooks called by * @type array $hook_extra Extra arguments to pass to the filter hooks called by
* {@see WP_Upgrader::run()}. * {@see WP_Upgrader::run()}.
* } * }
*
* @return array|false|WP_error The result from self::install_package() on success, otherwise a WP_Error, * @return array|false|WP_error The result from self::install_package() on success, otherwise a WP_Error,
* or false if unable to connect to the filesystem. * or false if unable to connect to the filesystem.
*/ */
@ -662,7 +665,10 @@ class WP_Upgrader {
return $res; return $res;
} }
//Download the package (Note, This just returns the filename of the file if the package is a local file) /*
* Download the package (Note, This just returns the filename
* of the file if the package is a local file)
*/
$download = $this->download_package( $options['package'] ); $download = $this->download_package( $options['package'] );
if ( is_wp_error($download) ) { if ( is_wp_error($download) ) {
$this->skin->error($download); $this->skin->error($download);
@ -675,7 +681,7 @@ class WP_Upgrader {
$delete_package = ( $download != $options['package'] ); // Do not delete a "local" file $delete_package = ( $download != $options['package'] ); // Do not delete a "local" file
//Unzips the file into a temporary directory // Unzips the file into a temporary directory.
$working_dir = $this->unpack_package( $download, $delete_package ); $working_dir = $this->unpack_package( $download, $delete_package );
if ( is_wp_error($working_dir) ) { if ( is_wp_error($working_dir) ) {
$this->skin->error($working_dir); $this->skin->error($working_dir);
@ -701,7 +707,7 @@ class WP_Upgrader {
$this->skin->error($result); $this->skin->error($result);
$this->skin->feedback('process_failed'); $this->skin->feedback('process_failed');
} else { } else {
//Install Succeeded // Install succeeded.
$this->skin->feedback('process_success'); $this->skin->feedback('process_success');
} }
@ -761,6 +767,7 @@ class Plugin_Upgrader extends WP_Upgrader {
* @since 2.8.0 * @since 2.8.0
* @access public * @access public
* @var array|WP_Error $result * @var array|WP_Error $result
*
* @see WP_Upgrader::$result * @see WP_Upgrader::$result
*/ */
public $result; public $result;
@ -822,7 +829,6 @@ class Plugin_Upgrader extends WP_Upgrader {
* @type bool $clear_update_cache Whether to clear the plugin updates cache if successful. * @type bool $clear_update_cache Whether to clear the plugin updates cache if successful.
* Default true. * Default true.
* } * }
*
* @return bool|WP_Error True if the install was successful, false or a WP_Error otherwise. * @return bool|WP_Error True if the install was successful, false or a WP_Error otherwise.
*/ */
public function install( $package, $args = array() ) { public function install( $package, $args = array() ) {
@ -940,7 +946,6 @@ class Plugin_Upgrader extends WP_Upgrader {
* @type bool $clear_update_cache Whether to clear the plugin updates cache if successful. * @type bool $clear_update_cache Whether to clear the plugin updates cache if successful.
* Default true. * Default true.
* } * }
*
* @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem. * @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem.
*/ */
public function bulk_upgrade( $plugins, $args = array() ) { public function bulk_upgrade( $plugins, $args = array() ) {
@ -969,10 +974,12 @@ class Plugin_Upgrader extends WP_Upgrader {
$this->skin->bulk_header(); $this->skin->bulk_header();
// Only start maintenance mode if: /*
// - running Multisite and there are one or more plugins specified, OR * Only start maintenance mode if:
// - a plugin with an update available is currently active. * - running Multisite and there are one or more plugins specified, OR
// @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible. * - a plugin with an update available is currently active.
* @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible.
*/
$maintenance = ( is_multisite() && ! empty( $plugins ) ); $maintenance = ( is_multisite() && ! empty( $plugins ) );
foreach ( $plugins as $plugin ) foreach ( $plugins as $plugin )
$maintenance = $maintenance || ( is_plugin_active( $plugin ) && isset( $current->response[ $plugin] ) ); $maintenance = $maintenance || ( is_plugin_active( $plugin ) && isset( $current->response[ $plugin] ) );
@ -996,7 +1003,7 @@ class Plugin_Upgrader extends WP_Upgrader {
continue; continue;
} }
// Get the URL to the zip file // Get the URL to the zip file.
$r = $current->response[ $plugin ]; $r = $current->response[ $plugin ];
$this->skin->plugin_active = is_plugin_active($plugin); $this->skin->plugin_active = is_plugin_active($plugin);
@ -1051,7 +1058,7 @@ class Plugin_Upgrader extends WP_Upgrader {
// Cleanup our hooks, in case something else does a upgrade on this connection. // Cleanup our hooks, in case something else does a upgrade on this connection.
remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin')); remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
// Force refresh of plugin update information // Force refresh of plugin update information.
wp_clean_plugins_cache( $parsed_args['clear_update_cache'] ); wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
return $results; return $results;
@ -1069,7 +1076,8 @@ class Plugin_Upgrader extends WP_Upgrader {
* @global WP_Filesystem_Base $wp_filesystem Subclass * @global WP_Filesystem_Base $wp_filesystem Subclass
* *
* @param string $source The path to the downloaded package source. * @param string $source The path to the downloaded package source.
* @return string|WP_Error The source as passed, or a {@see WP_Error} object if no plugins were found. * @return string|WP_Error The source as passed, or a {@see WP_Error} object
* if no plugins were found.
*/ */
public function check_package($source) { public function check_package($source) {
global $wp_filesystem; global $wp_filesystem;

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.4-alpha-33684'; $wp_version = '4.4-alpha-33685';
/** /**
* 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.