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

Line Code
267           }
268
269           // Remove upgrade hooks which are not required for translation updates.
270           remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
271           remove_action( 'upgrader_process_complete', 'wp_version_check' );
272           remove_action( 'upgrader_process_complete', 'wp_update_plugins' );
273           remove_action( 'upgrader_process_complete', 'wp_update_themes' );
274
275           /** This action is documented in wp-admin/includes/class-wp-upgrader.php */
276           do_action( 'upgrader_process_complete', $this, array(
277                'action'       => 'update',
278                'type'         => 'translation',
279                'bulk'         => true,
280                'translations' => $language_updates_results
281           ) );
282
283           // Re-add upgrade hooks.
284           add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
285           add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );