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_is_auto_update_enabled_for_typewp_nav_menu_update_menu_itemswp_print_update_row_templateswp_theme_auto_update_setting_templatewp_get_auto_update_message
引入
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 );
}