WordPress开发者和主题制作者的搜索引擎



_wp_register_meta_args_whitelist ›

Since4.6.0
已弃用n/a
_wp_register_meta_args_whitelist ( $args, $default_args )
访问:
  • private
参数: (2)
  • (array) $args Arguments from `register_meta()`.
    Required: Yes
  • (array) $default_args Default arguments for `register_meta()`.
    Required: Yes
返回:
  • (array) Filtered arguments.
定义在:
文档:

Filter out `register_meta()` args based on a whitelist.

register_meta() args may change over time, so requiring the whitelist to be explicitly turned off is a warranty seal of sorts.



源码

function _wp_register_meta_args_whitelist( $args, $default_args ) {
	return array_intersect_key( $args, $default_args );
}