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



wp_register_entity_actions › WordPress Function

Seit7.2.0
Veraltetn/v
› wp_register_entity_actions ( $origin, $kind, $name, $actions, $script_module = null )
Parameter: (5)
  • (string) $origin Who registers the actions: `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[]) $actions The list of action definitions, each with an `id`.
    Erforderlich: Ja
  • (string|null) $script_module The id of the script module providing the JavaScript parts of the actions, if any.
    Erforderlich: Nein
    Standard: null
Gibt zurück:
  • (string[]) The ids of the actions registered, in the order of the
    call. Empty when none is.
Definiert in:
Codex:

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

It only runs on the wp_entity_actions_api_init action.


Quellcode

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