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
2963            * Fires immediately prior to an auto-update.
2964            *
2965            * @since 4.4.0
2966            *
2967            * @param string $type    The type of update being checked: 'core', 'theme', 'plugin', or 'translation'.
2968            * @param object $item    The update offer.
2969            * @param string $context The filesystem context (a path) against which filesystem access and status
2970            *                        should be checked.
2971            */
2972           do_action( 'pre_auto_update', $type, $item, $context );
2973
2974           $upgrader_item = $item;
2975           switch ( $type ) {
2976                case 'core':
2977                     $skin->feedback( __( 'Updating to WordPress %s' ), $item->version );
2978                     $item_name = sprintf( __( 'WordPress %s' ), $item->version );
2979                     break;
2980                case 'theme':
2981                     $upgrader_item = $item->theme;