H5P Guides

WordPress Customization

If you wish to do local modifications in order for H5P content to fit better on your site, this is the place for you.

Hooks / Actions

The H5P WordPress plugin has the same hooks as the Drupal module does. These are useful altering various things.

For a complete list and instructions on how to use them, check out the examples in the H5P Mods plugin.

Content URLs

Sometimes you might need a static URL for your content, e.g. if you're storing results or relaying data to other services. You can use the content's iframe embed URL for this, but you might run into issues if you've disabled the embed dialog. What you want to do then is add an option to wp-config.php which changes this behaviour. Adding the following code to wp-config.php will make sure that the content URLs are always working:

define('H5P_EMBED_URL_ALWAYS_AVAILABLE', true);

Development Mode

Enabling the development mode in wp-config.php will make your H5P installation totally ignore the patch version of libraries. This means that if you upload an older or the same version of a library it will replace the existing one, no matter what.

define('H5P_DEV', true);

Be warned! You should never enable this option for a production site.