Warning: This function has been deprecated. Use _wp_register_meta_args_allowed_list() instead. Please consider writing more inclusive code.
Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
_wp_register_meta_args_whitelist() WordPress Function
The wp_register_meta_args_whitelist function allows you to white-list arguments for the register_meta function. This can be useful for making sure that only certain arguments are registered with the function.
_wp_register_meta_args_whitelist( array $args, array $default_args ) #
Filters out register_meta() args based on an allowed list.
Description
register_meta() args may change over time, so requiring the allowed list to be explicitly turned off is a warranty seal of sorts.
Parameters
- $args
(array)(Required)Arguments from
register_meta().- $default_args
(array)(Required)Default arguments for
register_meta().
Return
(array) Filtered arguments.
Source
File: wp-includes/deprecated.php
function _wp_register_meta_args_whitelist( $args, $default_args ) {
_deprecated_function( __FUNCTION__, '5.5.0', '_wp_register_meta_args_allowed_list()' );
return _wp_register_meta_args_allowed_list( $args, $default_args );
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 5.5.0 | Use _wp_register_meta_args_allowed_list() instead. Please consider writing more inclusive code. |
| 4.6.0 | Introduced. |