Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: upgrader_pre_install

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

Line Code
171           extract($args);
172
173           @set_time_limit( 300 );
174
175           if ( empty($source) || empty($destination) )
176                return new WP_Error('bad_request', $this->strings['bad_request']);
177
178           $this->skin->feedback('installing_package');
179
180           $res = apply_filters('upgrader_pre_install', true, $hook_extra);
181           if ( is_wp_error($res) )
182                return $res;
183
184           //Retain the Original source and destinations
185           $remote_source = $source;
186           $local_destination = $destination;
187
188           $source_files = array_keys( $wp_filesystem->dirlist($remote_source) );
189           $remote_destination = $wp_filesystem->find_folder($local_destination);