Make WordPress Core


Ignore:
Timestamp:
08/21/2015 04:12:45 AM (11 years ago)
Author:
DrewAPicture
Message:

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

Fixes #29086.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r33684 r33685  
    437437                 */
    438438                $res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );
     439
    439440                if ( is_wp_error( $res ) ) {
    440441                        return $res;
    … …  
    467468                 */
    468469                $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this );
     470
    469471                if ( is_wp_error( $source ) ) {
    470472                        return $source;
    … …  
    475477                        $source_files = array_keys( $wp_filesystem->dirlist( $source ) );
    476478                }
     479
    477480                /*
    478481                 * Protection against deleting files in any important base directories.
    … …  
    487490                        $protected_directories = array_merge( $protected_directories, $wp_theme_directories );
    488491                }
     492
    489493                if ( in_array( $destination, $protected_directories ) ) {
    490494                        $remote_destination = trailingslashit( $remote_destination ) . trailingslashit( basename( $source ) );
    … …  
    493497
    494498                if ( $clear_destination ) {
    495                         // We're going to clear the destination if there's something there
     499                        // We're going to clear the destination if there's something there.
    496500                        $this->skin->feedback('remove_old');
    497501
    … …  
    601605         *                                               {@see WP_Upgrader::run()}.
    602606         * }
    603          *
    604607         * @return array|false|WP_error The result from self::install_package() on success, otherwise a WP_Error,
    605608         *                              or false if unable to connect to the filesystem.
    … …  
    663666                }
    664667
    665                 //Download the package (Note, This just returns the filename of the file if the package is a local file)
     668                /*
     669                 * Download the package (Note, This just returns the filename
     670                 * of the file if the package is a local file)
     671                 */
    666672                $download = $this->download_package( $options['package'] );
    667673                if ( is_wp_error($download) ) {
    … …  
    676682                $delete_package = ( $download != $options['package'] ); // Do not delete a "local" file
    677683
    678                 //Unzips the file into a temporary directory
     684                // Unzips the file into a temporary directory.
    679685                $working_dir = $this->unpack_package( $download, $delete_package );
    680686                if ( is_wp_error($working_dir) ) {
    … …  
    687693                }
    688694
    689                 //With the given options, this installs it to the destination directory.
     695                // With the given options, this installs it to the destination directory.
    690696                $result = $this->install_package( array(
    691697                        'source' => $working_dir,
    … …  
    702708                        $this->skin->feedback('process_failed');
    703709                } else {
    704                         //Install Succeeded
     710                        // Install succeeded.
    705711                        $this->skin->feedback('process_success');
    706712                }
    … …  
    762768         * @access public
    763769         * @var array|WP_Error $result
     770         *
    764771         * @see WP_Upgrader::$result
    765772         */
    … …  
    823830         *                                    Default true.
    824831         * }
    825          *
    826832         * @return bool|WP_Error True if the install was successful, false or a WP_Error otherwise.
    827833         */
    … …  
    941947         *                                    Default true.
    942948         * }
    943          *
    944949         * @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem.
    945950         */
    … …  
    970975                $this->skin->bulk_header();
    971976
    972                 // Only start maintenance mode if:
    973                 // - running Multisite and there are one or more plugins specified, OR
    974                 // - a plugin with an update available is currently active.
    975                 // @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible.
     977                /*
     978                 * Only start maintenance mode if:
     979                 * - running Multisite and there are one or more plugins specified, OR
     980                 * - a plugin with an update available is currently active.
     981                 * @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible.
     982                 */
    976983                $maintenance = ( is_multisite() && ! empty( $plugins ) );
    977984                foreach ( $plugins as $plugin )
    … …  
    9971004                        }
    9981005
    999                         // Get the URL to the zip file
     1006                        // Get the URL to the zip file.
    10001007                        $r = $current->response[ $plugin ];
    10011008
    … …  
    10521059                remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'));
    10531060
    1054                 // Force refresh of plugin update information
     1061                // Force refresh of plugin update information.
    10551062                wp_clean_plugins_cache( $parsed_args['clear_update_cache'] );
    10561063
    … …  
    10701077         *
    10711078         * @param string $source The path to the downloaded package source.
    1072          * @return string|WP_Error The source as passed, or a {@see WP_Error} object if no plugins were found.
     1079         * @return string|WP_Error The source as passed, or a {@see WP_Error} object
     1080         *                         if no plugins were found.
    10731081         */
    10741082        public function check_package($source) {
Note: See TracChangeset for help on using the changeset viewer.