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



wp_register_entity_actions › WordPress Function

Depuis7.2.0
Dépréciéen/a
› wp_register_entity_actions ( $origin, $kind, $name, $actions, $script_module = null )
Paramètres: (5)
  • (string) $origin Who registers the actions: `core`, or the slug of the plugin or theme.
    Requis: Oui
  • (string) $kind The entity kind (e.g. `postType`).
    Requis: Oui
  • (string) $name The entity name (e.g. `page`).
    Requis: Oui
  • (array[]) $actions The list of action definitions, each with an `id`.
    Requis: Oui
  • (string|null) $script_module The id of the script module providing the JavaScript parts of the actions, if any.
    Requis: Non
    Défaut: null
Retourne:
  • (string[]) The ids of the actions registered, in the order of the
    call. Empty when none is.
Défini(e) dans:
Codex:

Registers actions for an entity, see {@see WP_Entity_Actions_Registry::register()}.

It only runs on the wp_entity_actions_api_init action.


Source

function wp_register_entity_actions( $origin, $kind, $name, $actions, $script_module = null ) {
	return WP_Entity_Actions_Registry::get_instance()->register( $origin, $kind, $name, $actions, $script_module );
}