Interactive Content icon
LMS & Education

Interactive Content hooks reference

  • By icc0rz
  • v1.17.10
  • Updated

Interactive Content 1.17.10 has 6 actions and 5 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when Interactive Content fires an action
add_action( 'h5p_additional_embed_head_tags', function( $additional_embed_head_tags ) {
	// Your code runs here.
}, 10, 1 );

// Change a value Interactive Content is about to use
add_filter( 'h5p_embed_access', function( $embed_allowed, $id ) {
	// Change $embed_allowed here.
	return $embed_allowed;
}, 10, 2 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • admin/class-h5p-plugin-admin.php line 246
    /**
     * Add support for additional head tags for embedded content. Very useful when
     * adding xAPI events tracking code.
     */
    do_action_ref_array( 'h5p_additional_embed_head_tags', array(&$additional_embed_head_tags) );
  • public/class-h5p-plugin.php line 1036
    /**
     * Allows you to alter the H5P content parameters after they have been
     * filtered. This hook only fires before view.
     */
    do_action_ref_array( 'h5p_alter_filtered_parameters', array(&$decoded_parameters, $content['library']['name'], $content['library']['majorVersion'], $content['library']['minorVersion']) );
  • public/class-h5p-plugin.php line 1198
    /**
     * Allows you to alter which JavaScripts are loaded for H5P. This is useful for
     * adding your own custom scripts or replacing existing once.
     */
    do_action_ref_array( 'h5p_alter_library_scripts', array(&$files['scripts'], $libraries, $embed) );
  • public/class-h5p-wordpress.php line 685
    /**
     * Allows you to alter the H5P library semantics, i.e. changing how the editor
     * looks and how content parameters are filtered.
     */
    do_action_ref_array( 'h5p_alter_library_semantics', array(&$semantics, $name, $majorVersion, $minorVersion) );
  • public/class-h5p-plugin.php line 1210
    /**
     * Allows you to alter which stylesheets are loaded for H5P. This is useful for
     * adding your own custom stylesheets or replacing existing once.
     */
    do_action_ref_array( 'h5p_alter_library_styles', array(&$files['styles'], $libraries, $embed) );
  • admin/class-h5p-plugin-admin.php line 807
    /**
     * Allows you to alter a user's submitted result for a given H5P content This
     * action is fired before the result is saved.
     */
    do_action_ref_array( 'h5p_alter_user_result', array(&$data, $result_id, $content_id, $user_id) );
  • admin/class-h5p-plugin-admin.php line 195
    /**
     * Allows other plugins to change the access permission for the embedded
     * iframe's content.
     */
    apply_filters( 'h5p_embed_access', $embed_allowed, $id );
  • admin/class-h5p-content-admin.php line 501
    apply_filters( 'attribute_escape', $safe_text, $parameters );
  • public/class-h5p-plugin.php line 1521
    apply_filters( 'h5p_rest_api_all_permission', current_user_can('edit_others_h5p_contents') );
  • plugin_locale

    filter
    public/class-h5p-plugin.php line 809
    apply_filters( 'plugin_locale', get_locale(), $domain );
  • public/class-h5p-plugin.php line 1162
    apply_filters( 'print_h5p_content', $h5p_content_wrapper, $content );

Generated from Interactive Content's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: