concrete5/concrete5 — pull request #589 by JohntheFish (2012-07-18 12:38:54+00:00)
Title: Add an 'on_block_load' event.

To avoid performance impact where it is not needed, firing the event is controlled by ENABLE_ON_BLOCK_LOAD_EVENT definition. If ENABLE_ON_BLOCK_LOAD_EVENT is set, 'on_block_load' will be fired. Event handlers have the opportunity to return a modified block record.

This will facilitate adjusting loaded block data. For example, it is now possible to develop an attribute or package to modify the file set loaded by a gallery depending on the page or user. We can make stacks and global areas responsive to where they are shown, who is logged in, or who owns the page.