wp_is_auto_update_forced_for_item

函数


wp_is_auto_update_forced_for_item ( $type, $update, $item )
参数
  • (string)
    $type
    The type of update being checked: ‘theme’ or ‘plugin’.
    Required:
  • (bool|null)
    $update
    Whether to update. The value of null is internally used to detect whether nothing has hooked into this filter.
    Required:
  • (object)
    $item
    The update offer.
    Required:
返回值
  • (bool) True if auto-updates are forced for `$item`, false otherwise.
定义位置
  • wp-admin/includes/update.php
    , line 1086
引入
5.6.0
弃用

Checks whether auto-updates are forced for an item.

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