m-lua-scripting: push_event API to return the event created

This commit is contained in:
Ashok Sidipotu
2022-08-15 06:59:14 +05:30
committed by Julian Bouzas
parent 3b211d9082
commit 270dc5c041

View File

@@ -1676,6 +1676,7 @@ event_dispatcher_push_event (lua_State *L)
wp_event_dispatcher_get_instance (get_wp_core (L));
WpEvent *event = wp_event_new (type, priority, properties, source, subject);
wp_event_dispatcher_push_event (dispatcher, event);
wplua_pushboxed (L, WP_TYPE_EVENT, wp_event_ref (event));
return 0;
}