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
棄用
-

wp_is_auto_update_forced_item: 這個函式用來檢查WordPress中的一個特定專案是否被強制自動更新。它接收一個專案引數(例如,主題、外掛、核心),如果自動更新對該專案是強制的,則返回true。

檢查是否對一個專案強制進行了自動更新。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
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 );
}
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 ); }
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 );
}

常見問題

FAQs
檢視更多 >