remove_option_update_handler

函式
remove_option_update_handler ( $option_group, $option_name, $sanitize_callback = '' )
引數
  • (string) $option_group The settings group name used during registration.
    Required:
  • (string) $option_name The name of the option to unregister.
    Required:
  • (callable) $sanitize_callback Optional. Deprecated.
    Required:
    Default: (empty)
相關
  • unregister_setting()
定義位置
相關方法
add_option_update_handleroption_update_filterremove_option_whitelist_json_wp_die_handlersend_frame_options_header
引入
2.7.0
棄用
3.0.0

remove_option_update_handler: 這個函式用來刪除WordPress中的一個選項更新處理器。選項更新處理程式是用來處理WordPress選項的更新: 這個函式需要兩個引數:選項名稱和要刪除的回撥函式。

取消註冊一個設定

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
_deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' );
unregister_setting( $option_group, $option_name, $sanitize_callback );
}
function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) { _deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' ); unregister_setting( $option_group, $option_name, $sanitize_callback ); }
function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
	_deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' );
	unregister_setting( $option_group, $option_name, $sanitize_callback );
}

常見問題

FAQs
檢視更多 >