wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_update_entity_fields › WordPress Function

Seit7.2.0
Veraltetn/v
› wp_update_entity_fields ( $origin, $kind, $name, $fields, $script_module = null )
Parameter: (5)
  • (string) $origin Who updates the fields: `core`, or the slug of the plugin or theme.
    Erforderlich: Ja
  • (string) $kind The entity kind (e.g. `postType`).
    Erforderlich: Ja
  • (string) $name The entity name (e.g. `page`).
    Erforderlich: Ja
  • (array[]) $fields The list of partial field definitions, each with the `id` of a registered field.
    Erforderlich: Ja
  • (string|null) $script_module The id of the script module providing the JavaScript parts of the fields, if any.
    Erforderlich: Nein
    Standard: null
Gibt zurück:
  • (string[]) The ids of the fields updated, in the order of the
    call. Empty when none is.
Definiert in:
Codex:

Updates registered fields of an entity, see {@see WP_Entity_Fields_Registry::update()}.

It only runs on the wp_entity_fields_api_init action.


Quellcode

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