Permalink
Browse files

docs(events): prefered use of the shutdown event vs shutdown function

fixes #7619
  • Loading branch information...
jeabakker committed Sep 23, 2016
1 parent fbf52cb commit c62b307d4898f4774592d52922560fd3380f8a8b
Showing with 5 additions and 1 deletion.
  1. +3 −0 docs/guides/events-list.rst
  2. +2 −1 docs/guides/guidelines.rst
@@ -32,6 +32,9 @@ System events
might not be shown until after the process is completed. This means that any long-running
processes will still delay the page load.
.. note:: This event is prefered above using ``register_shutdown_function`` as you may not have access
to all the Elgg services (eg. database) in the shutdown function but you will in the event.
**regenerate_site_secret:before, system**
Return false to cancel regenerating the site secret. You should also provide a message
to the user.
@@ -120,4 +120,5 @@ These points are good ideas, but are not yet in the official guidelines. Followi
- Do not use the ``bundled`` category with your plugins. That is for plugins distributed with Elgg
- Update functions deprecated in 1.8.
- Many registration functions simply added an ``elgg_`` prefix for consistency
- See ``/engine/lib/deprecated-1.8.php`` for the full list. You can also set the debug level to warning to get visual reminders of deprecated functions
- See ``/engine/lib/deprecated-1.8.php`` for the full list. You can also set the debug level to warning to get visual reminders of deprecated functions
- Don't use ``register_shutdown_function`` as you may not have access to certain Elgg parts anymore (eg database). Instead use the ``shutdown`` ``system`` event

0 comments on commit c62b307

Please sign in to comment.