wp_is_auto_update_forced_for_item()WP 5.6.0

Checks whether auto-updates are forced for an item.

Хуки из функции


true|false. True if auto-updates are forced for $item, false otherwise.


wp_is_auto_update_forced_for_item( $type, $update, $item );
$type(строка) (обязательный)
The type of update being checked: Either 'theme' or 'plugin'.
$update(true|false|null) (обязательный)
Whether to update. The value of null is internally used to detect whether nothing has hooked into this filter.
$item(объект) (обязательный)
The update offer.

Список изменений

С версии 5.6.0 Введена.

Код wp_is_auto_update_forced_for_item() WP 6.5.2

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