wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_register_entity_fields › WordPress Function

Da7.2.0
Deprecaton/a
› wp_register_entity_fields ( $origin, $kind, $name, $fields, $script_module = null )
Parametri: (5)
  • (string) $origin Who registers the fields: `core`, or the slug of the plugin or theme.
    Richiesto: Sì
  • (string) $kind The entity kind (e.g. `postType`).
    Richiesto: Sì
  • (string) $name The entity name (e.g. `page`).
    Richiesto: Sì
  • (array[]) $fields The list of field definitions, each with an `id`.
    Richiesto: Sì
  • (string|null) $script_module The id of the script module providing the JavaScript parts of the fields, if any.
    Richiesto: No
    Default: null
Ritorna:
  • (string[]) The ids of the fields registered, in the order of the
    call. Empty when none is.
Definito a:
Codex:

Registers fields for an entity, see {@see WP_Entity_Fields_Registry::register()}.

It only runs on the wp_entity_fields_api_init action.


Sorgenti

function wp_register_entity_fields( $origin, $kind, $name, $fields, $script_module = null ) {
	return WP_Entity_Fields_Registry::get_instance()->register( $origin, $kind, $name, $fields, $script_module );
}