Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: pre_auto_update

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
389            * Fires immediately prior to an auto-update.
390            *
391            * @since 4.4.0
392            *
393            * @param string $type    The type of update being checked: 'core', 'theme', 'plugin', or 'translation'.
394            * @param object $item    The update offer.
395            * @param string $context The filesystem context (a path) against which filesystem access and status
396            *                        should be checked.
397            */
398           do_action( 'pre_auto_update', $type, $item, $context );
399
400           $upgrader_item = $item;
401           switch ( $type ) {
402                case 'core':
403                     /* translators: %s: WordPress version. */
404                     $skin->feedback( __( 'Updating to WordPress %s' ), $item->version );
405                     /* translators: %s: WordPress version. */
406                     $item_name = sprintf( __( 'WordPress %s' ), $item->version );
407                     break;