wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_register_entity_actions › WordPress Function

Since7.2.0
已弃用n/a
› wp_register_entity_actions ( $origin, $kind, $name, $actions, $script_module = null )
参数: (5)
  • (string) $origin Who registers the actions: `core`, or the slug of the plugin or theme.
    Required: Yes
  • (string) $kind The entity kind (e.g. `postType`).
    Required: Yes
  • (string) $name The entity name (e.g. `page`).
    Required: Yes
  • (array[]) $actions The list of action definitions, each with an `id`.
    Required: Yes
  • (string|null) $script_module The id of the script module providing the JavaScript parts of the actions, if any.
    Required: No
    默认: null
返回:
  • (string[]) The ids of the actions registered, in the order of the
    call. Empty when none is.
定义在:
文档:

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

It only runs on the wp_entity_actions_api_init action.


源码

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