On this page
wp_is_auto_update_forced_for_item( string $type, bool|null $update, object $item ): bool
Checks whether auto-updates are forced for an item.
Parameters
$typestring Required-
The type of update being checked:
'theme'or'plugin'. $updatebool|null Required-
Whether to update. The value of null is internally used to detect whether nothing has hooked into this filter.
$itemobject Required-
The update offer.
Return
bool True if auto-updates are forced for $item, false otherwise.
Source
File: wp-admin/includes/update.php. View all references
function wp_is_auto_update_forced_for_item( $type, $update, $item ) {
/** This filter is documented in wp-admin/includes/class-wp-automatic-updater.php */
return apply_filters( "auto_update_{$type}", $update, $item );
}
Hooks
- apply_filters( "auto_update_{$type}",
bool|null $update ,object $item ) -
Filters whether to automatically update core, a plugin, a theme, or a language.
Related
Uses
| Uses | Description |
|---|---|
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Used By
| Used By | Description |
|---|---|
| WP_Site_Health::detect_plugin_theme_auto_update_issues() wp-admin/includes/class-wp-site-health.php | Checks for potential issues with plugin and theme auto-updates. |
| WP_Debug_Data::debug_data() wp-admin/includes/class-wp-debug-data.php | Static function for generating site debug data when required. |
| wp_prepare_themes_for_js() wp-admin/includes/theme.php | Prepares themes for JavaScript. |
| WP_Plugins_List_Table::prepare_items() wp-admin/includes/class-wp-plugins-list-table.php | |
| WP_MS_Themes_List_Table::prepare_items() wp-admin/includes/class-wp-ms-themes-list-table.php |
Changelog
| Version | Description |
|---|---|
| 5.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_is_auto_update_forced_for_item