Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: upgrader_process_complete

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 4 times in this file.

Line Code
688                //Install Succeeded
689                $this->skin->feedback('process_success');
690           }
691
692           $this->skin->after();
693
694           if ( ! $options['is_multi'] ) {
695
696                /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
697                do_action( 'upgrader_process_complete', $this, $options['hook_extra'] );
698                $this->skin->footer();
699           }
700
701           return $result;
702      }
703
704      /**
705       * Toggle maintenance mode for the site.
706       *
 
Line Code
1007            * @param array           $data {
1008            *     Array of bulk item update data.
1009            *
1010            *     @type string $action   Type of action. Default 'update'.
1011            *     @type string $type     Type of update process. Accepts 'plugin', 'theme', or 'core'.
1012            *     @type bool   $bulk     Whether the update process is a bulk update. Default true.
1013            *     @type array  $packages Array of plugin, theme, or core packages to update.
1014            * }
1015            */
1016           do_action( 'upgrader_process_complete', $this, array(
1017                'action' => 'update',
1018                'type' => 'plugin',
1019                'bulk' => true,
1020                'plugins' => $plugins,
1021           ) );
1022
1023           $this->skin->bulk_footer();
1024
1025           $this->skin->footer();
 
Line Code
1538
1539                // Prevent credentials auth screen from displaying multiple times
1540                if ( false === $result )
1541                     break;
1542           } //end foreach $plugins
1543
1544           $this->maintenance_mode(false);
1545
1546           /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
1547           do_action( 'upgrader_process_complete', $this, array(
1548                'action' => 'update',
1549                'type' => 'theme',
1550                'bulk' => true,
1551                'themes' => $themes,
1552           ) );
1553
1554           $this->skin->bulk_footer();
1555
1556           $this->skin->footer();
 
Line Code
2192
2193                     $rollback_result = $this->upgrade( $current, array_merge( $parsed_args, array( 'do_rollback' => true ) ) );
2194
2195                     $original_result = $result;
2196                     $result = new WP_Error( 'rollback_was_required', $this->strings['rollback_was_required'], (object) array( 'update' => $original_result, 'rollback' => $rollback_result ) );
2197                }
2198           }
2199
2200           /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
2201           do_action( 'upgrader_process_complete', $this, array( 'action' => 'update', 'type' => 'core' ) );
2202
2203           // Clear the current updates
2204           delete_site_transient( 'update_core' );
2205
2206           if ( ! $parsed_args['do_rollback'] ) {
2207                $stats = array(
2208                     'update_type'      => $current->response,
2209                     'success'          => true,
2210                     'fs_method'        => $wp_filesystem->method,