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

Line Code
122           }
123
124           $download = $this->download_package( $current->packages->$to_download, true );
125
126           // Allow for signature soft-fail.
127           // WARNING: This may be removed in the future.
128           if ( is_wp_error( $download ) && $download->get_error_data( 'softfail-filename' ) ) {
129                // Outout the failure error as a normal feedback, and not as an error:
130                /** This filter is documented in wp-admin/includes/update-core.php */
131                apply_filters( 'update_feedback', $download->get_error_message() );
132
133                // Report this failure back to WordPress.org for debugging purposes.
134                wp_version_check(
135                     array(
136                          'signature_failure_code' => $download->get_error_code(),
137                          'signature_failure_data' => $download->get_error_data(),
138                     )
139                );
140
 
Line Code
186                     } elseif ( false !== strpos( $error_code, '__copy_dir' ) ) {
187                          $try_rollback = true;
188                     } elseif ( 'disk_full' === $error_code ) {
189                          $try_rollback = true;
190                     }
191                }
192
193                if ( $try_rollback ) {
194                     /** This filter is documented in wp-admin/includes/update-core.php */
195                     apply_filters( 'update_feedback', $result );
196
197                     /** This filter is documented in wp-admin/includes/update-core.php */
198                     apply_filters( 'update_feedback', $this->strings['start_rollback'] );
199
200                     $rollback_result = $this->upgrade( $current, array_merge( $parsed_args, array( 'do_rollback' => true ) ) );
201
202                     $original_result = $result;
203                     $result          = new WP_Error(
204                          'rollback_was_required',
205                          $this->strings['rollback_was_required'],
206                          (object) array(
207                               'update'   => $original_result,