wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



_wp_add_entity_field_modules_to_editor_script › WordPress Function

Depuis7.2.0
Dépréciéen/a
› _wp_add_entity_field_modules_to_editor_script ( $scripts = null )
Accès:
  • private
Paramètres:
  • (WP_Scripts|null) $scripts Optional. The scripts registry. Default null, the global one.
    Requis: Non
    Défaut: null
Défini(e) dans:
Codex:

Declares the script modules of the entity fields as dependencies of the editor script, see _wp_add_entity_modules_to_editor_script().

The fields are loaded by the editor package, see packages/editor/src/dataviews/store/private-resolvers.ts in Gutenberg, which means any screen that wants to use this mechanism needs to load the editor script. It is hooked to admin_footer without arguments, so the global scripts registry is used. In other scenarios (tests), the scripts are given directly.


Source

function _wp_add_entity_field_modules_to_editor_script( $scripts = null ) {
	_wp_add_entity_modules_to_editor_script( $scripts, 'wp_get_all_registered_entity_field_modules' );
}