Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: update_feedback

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 2 times in this file.

Line Code
1395                     if ( false !== strpos( $error_code, 'do_rollback' ) )
1396                          $try_rollback = true;
1397                     elseif ( false !== strpos( $error_code, '__copy_dir' ) )
1398                          $try_rollback = true;
1399                     elseif ( 'disk_full' === $error_code )
1400                          $try_rollback = true;
1401                }
1402
1403                if ( $try_rollback ) {
1404                     apply_filters( 'update_feedback', $result );
1405                     apply_filters( 'update_feedback', $this->strings['start_rollback'] );
1406
1407                     $rollback_result = $this->upgrade( $current, array_merge( $parsed_args, array( 'do_rollback' => true ) ) );
1408
1409                     $original_result = $result;
1410                     $result = new WP_Error( 'rollback_was_required', $this->strings['rollback_was_required'], (object) array( 'update' => $original_result, 'rollback' => $rollback_result ) );
1411                }
1412           }
1413
1414           do_action( 'upgrader_process_complete', $this, array( 'action' => 'update', 'type' => 'core' ) );