wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_update_entity_fields › WordPress Function

Od7.2.0
Przestarzałyn/a
› wp_update_entity_fields ( $origin, $kind, $name, $fields, $script_module = null )
Parametry: (5)
  • (string) $origin Who updates the fields: `core`, or the slug of the plugin or theme.
    Wymagane: Tak
  • (string) $kind The entity kind (e.g. `postType`).
    Wymagane: Tak
  • (string) $name The entity name (e.g. `page`).
    Wymagane: Tak
  • (array[]) $fields The list of partial field definitions, each with the `id` of a registered field.
    Wymagane: Tak
  • (string|null) $script_module The id of the script module providing the JavaScript parts of the fields, if any.
    Wymagane: Nie
    Domyślny: null
Powrót:
  • (string[]) The ids of the fields updated, in the order of the
    call. Empty when none is.
Zdefiniowane na:
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.


Źródło

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 );
}