wp_is_auto_update_forced_for_item( string $type, bool|null $update, object $item )

Checks whether auto-updates are forced for an item.

Parameters Parameters


(string) (Required) The type of update being checked: 'theme' or 'plugin'.


(bool|null) (Required) Whether to update. The value of null is internally used to detect whether nothing has hooked into this filter.


(object) (Required) The update offer.

Top ↑

Return Return

(bool) True if auto-updates are forced for $item, false otherwise.

Top ↑

Source Source

File: wp-admin/includes/update.php

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 );

Top ↑

Changelog Changelog

Version Description
5.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.