Hook: godam_player_enqueue_styles
The godam_player_enqueue_styles
action hook allows you (plugin or theme developers) to enqueue additional stylesheets specifically for the GoDAM video player. This is useful when you want to customize the appearance of the player using your own CSS file, such as adding a custom skin, overriding controls, or adapting to a theme.
Usage Example
add_action( 'godam_player_enqueue_styles', function () {
wp_enqueue_style(
'my-custom-godam-skin',
get_stylesheet_directory_uri() . '/css/godam-skin-custom.css',
[],
filemtime( get_stylesheet_directory() . '/css/godam-skin-custom.css' )
);
} );
In this example, a custom skin located in your theme’s /css/
directory is enqueued and applied globally to all instances of the GoDAM player.
When It Runs
This hook is fired during the wp_enqueue_scripts
and admin_enqueue_scripts
phases meaning:
- Styles enqueued here are applied both in frontend and block editor.
- You can add conditional logic to restrict enqueues to frontend only if needed.
Hook Signature
do_action( 'godam_player_enqueue_styles' );
No parameters are passed to this hook.
Common Use Cases
- Enqueue a custom player skin from your theme or child theme.
- Load theme-specific tweaks for player spacing, buttons, or overlays.
- Add font styles or animations for interactive player elements.