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



wp_register_entity_field_collection › WordPress Function

Since7.2.0
已弃用n/a
› wp_register_entity_field_collection ( $directory )
参数:
  • (string) $directory The directory of the collection.
    Required: Yes
返回:
  • (bool) Whether the collection is valid and all of its fields are
    registered. True as well when it has no fields.
定义在:
文档:

Registers the fields of a field collection, see {@see WP_Entity_Fields_Registry::register_collection()} for the format of a collection.

Like wp_register_entity_fields(), it only runs on the wp_entity_fields_api_init action.


源码

function wp_register_entity_field_collection( $directory ) {
	return WP_Entity_Fields_Registry::get_instance()->register_collection( $directory );
}