Skip to content

hook 'h5p_save_content' after inserting or updating content#179

Open
RamonSVieira wants to merge 1 commit intoh5p:masterfrom
RamonSVieira:master
Open

hook 'h5p_save_content' after inserting or updating content#179
RamonSVieira wants to merge 1 commit intoh5p:masterfrom
RamonSVieira:master

Conversation

@RamonSVieira
Copy link

The 'h5p_save_content' hook allows other system components to respond to the event of saving H5P content. This can be useful for performing additional tasks, such as notifying users, synchronizing data with other systems, or any other operation necessary after saving the content. It is also beneficial for developers as they can extend and customize the system's behavior without directly modifying the core code. This allows for different functionalities to be added or modified in a more modular and organized manner.

@1LgR
Copy link

1LgR commented Aug 22, 2025

Very good! Genius!

@otacke
Copy link
Contributor

otacke commented Aug 22, 2025

Yup, in fact simple - can't you just merge this by glancing at the code without any testing at all? - yet useful. Since this was not available years ago (and it still is not) and would not have been in time, I had to build myself a very clumsy workaround to detect saving and determine the correct ID on a platform that is used by multiple concurrent authors. So I can really say: This helps developers a lot! Please review and merge soon.

@Matheu46
Copy link

Matheu46 commented Sep 5, 2025

It's a very useful feature. To make it even better, it would be great if the event_type were also included in the attributes. That way, we can easily know whether the content was created or updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants