Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: auto_update_{$type}

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
1057  *
1058  * @param string    $type   The type of update being checked: 'theme' or 'plugin'.
1059  * @param bool|null $update Whether to update. The value of null is internally used
1060  *                          to detect whether nothing has hooked into this filter.
1061  * @param object    $item   The update offer.
1062  * @return bool True if auto-updates are forced for `$item`, false otherwise.
1063  */
1064 function wp_is_auto_update_forced_for_item( $type, $update, $item ) {
1065      /** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
1066      return apply_filters( "auto_update_{$type}", $update, $item );
1067 }
1068
1069 /**
1070  * Determines the appropriate auto-update message to be displayed.
1071  *
1072  * @since 5.5.0
1073  *
1074  * @return string The update message to be shown.
1075  */