Nahnu Video For Bunny Stream (Bunny.net) 1.0.2 has 10 actions and 24 filters, read directly from its source code on Nov 19, 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.
// Run your own code when Nahnu Video For Bunny Stream (Bunny.net) fires an action
add_action( 'nahnu_video_before_render', function( $video, $atts ) {
// Your code runs here.
}, 10, 2 );
// Change a value Nahnu Video For Bunny Stream (Bunny.net) is about to use
add_filter( 'nahnu_video_cdn_token_expiry', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );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
-
/** * Filters how many seconds a signed CDN URL stays valid for. These URLs are * rebuilt fresh on every page render (they're plain string templates, not * stored), so a short expiry is fine for a normal front-end page view. But the * block editor's preview of a video/grid/playlist block is rendered once and * then sits in the DOM for as long as that tab stays open, it does NOT * silently re-fetch on a timer, ... */ apply_filters( 'nahnu_video_cdn_token_expiry', DAY_IN_SECONDS ); -
/** * Filters the resolved embed params right before they're baked into the * iframe's src, server-side. */ apply_filters( 'nahnu_video_embed_params', array( 'autoplay' => $autoplay, 'preload' => $preload, 'loop' => (bool) $settings['loop'], 'muted' => (bool) $settings['muted'], 'responsive' => (bool) $settings['responsive'], 'chromecast' => (bool) $settings['chromecast'], 'disable_airplay' => (bool) $settings['disable_airplay'], 'show_speed' => (bool) $settings['show_speed'], 'remember_position' => (bool) $settings['remember_position'], 'com... ); -
/** * This filter is documented below. */ apply_filters( 'nahnu_video_player_mode', $mode, $atts ); -
/** * Fires right before a single video's markup is built. */ do_action( 'nahnu_video_before_render', $video, $atts ); -
/** * Filters the Bunny Stream credentials, so another plugin that already stores * them (e.g. an offload plugin) can share its own instead of the site owner * entering them twice. A good callback only fills in values that are empty * here, so anything the site owner typed into Settings still wins. Return the * array unchanged to keep this plugin's own values. The CDN Pull Zone is not * part of this; it always... */ apply_filters( 'nahnu_video_bunny_credentials', $credentials ); -
/** * Filters the URL of Google's Cast sender script, loaded by local-player.js * only when Chromecast is on (Settings → Player) and only in browsers that * can cast. Google requires loading it from its own server. */ apply_filters( 'nahnu_video_cast_sdk_url', 'https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1' ); -
/** * Filters the CDN URLs built for one video, the hook point for routing * thumbnails/previews/HLS/embed through a custom proxy, a different CDN in * front of Bunny, or a signed-URL wrapper, without touching this class. */ apply_filters( 'nahnu_video_cdn_urls', $urls, $video_guid, $this->library_id ); -
/** * Filters this plugin's default settings, the hook point for a theme or * companion plugin to pre-seed different defaults (e.g. a starter theme * shipping its own brand color) rather than the ones a site owner would * otherwise have to change by hand after activation. Runs every time defaults * are read, not just once on activation, get_all()'s wp_parse_args() means a * filtered-in key here only takes effe... */ apply_filters( 'nahnu_video_default_settings', $defaults ); -
/** * Fires just before a nahnu_video post is permanently deleted (emptied from * the Trash, or deleted in code). Nahnu Video does not delete the video in * Bunny. That decision is left to whoever listens here. */ do_action( 'nahnu_video_deleted', $guid, (int) $post_id, $attachment_id ); -
/** * Whether the block editor preview uses self-hosted copies of thumbnails * instead of loading them from the Bunny CDN. */ apply_filters( 'nahnu_video_editor_local_thumbnails', true ); -
/** * Filters the final HTML for a [bunny_grid] output. */ apply_filters( 'nahnu_video_grid_html', $html, $post_ids, $atts ); -
/** * Filters the final HTML for a single video. */ apply_filters( 'nahnu_video_html', $html, $video, $atts ); -
/** * Filters the post data right before the video post is created or updated, * e.g. to use a Media Library attachment's title and description instead of * Bunny's raw file name. */ apply_filters( 'nahnu_video_insert_post_args', $post_args, $bunny_video, $is_new, $args ); -
/** * Filters whether the current render is treated as a block editor preview. */ apply_filters( 'nahnu_video_is_editor_preview', false !== strpos( $request_uri, 'block-renderer' ) ); -
/** * Fires once Nahnu Video has fully loaded and every public function and * integration hook is ready to use. Other plugins can hook here (or check * function_exists( 'nahnu_video_api_version' )) instead of testing for each * function separately. */ do_action( 'nahnu_video_loaded', Nahnu_Video_Integration::API_VERSION ); -
/** * Filters the options handed to one Nahnu Player. */ apply_filters( 'nahnu_video_local_player_options', $options, $video ); -
/** * Filters the final HTML for a [bunny_playlist] output. */ apply_filters( 'nahnu_video_playlist_html', $html, $videos, $atts ); -
/** * Filters the WP_Query args used to find videos for [bunny_grid] and * nahnu_video_query(), the hook point for a custom sort, an extra meta_query * condition, or excluding specific videos, all without touching this class. */ apply_filters( 'nahnu_video_query_args', $query_args, $args ); -
/** * Delays in seconds between "is it done encoding yet?" checks. One entry per * retry; once they run out, the next full sync or webhook picks it up instead. * Return an empty array to disable. */ apply_filters( 'nahnu_video_refresh_retry_delays', array( 60, 120, 300, 600, 900, 1800, 3600 ), $guid ); -
/** * Whether a full sync should move videos that no longer exist in Bunny to the * Trash. Return false to keep them instead. */ apply_filters( 'nahnu_video_remove_missing_on_sync', true ); -
/** * Fires after a video post was moved to the Trash because its video is gone * from Bunny (or another plugin said so). The video in Bunny itself is never * touched by this plugin. */ do_action( 'nahnu_video_removed', $post_id, $guid, $context ); -
/** * Filters a single video's render attributes before it's resolved and drawn. */ apply_filters( 'nahnu_video_render_args', $atts ); -
/** * Whether a video should be imported/updated at all. Return false to skip it, * e.g. to leave out videos from one Bunny collection, or to wait until * encoding has finished. */ apply_filters( 'nahnu_video_should_import', true, $bunny_video, (int) $existing_id, $args ); -
/** * Filters the stats array returned for one video, by nahnu_video_get_stats(), * the REST stats endpoints, and the Video Control stats column. The hook point * for another plugin to add its own fields (e.g. a separate analytics number) * or adjust these before they're shown/returned. */ apply_filters( 'nahnu_video_stats', $stats, $post_id ); -
/** * Fires after one video's watch-time/engagement stats have been freshly pulled * from Bunny, the hook point for another plugin to merge in its own tracking * data or mirror stats elsewhere. */ do_action( 'nahnu_video_stats_refreshed', $post_id, $stats ); -
/** * Fires after a full sync run completes (manual "Sync Now" or the scheduled * cron), the hook point for post-sync side effects across the whole batch, * e.g. sending a summary notification. */ do_action( 'nahnu_video_sync_completed', $result ); -
/** * Fires after one video has been created or updated, by a full sync, * nahnu_video_import() or nahnu_video_refresh(). The hook point for another * plugin to react to a video appearing or changing (auto-tag it, notify * someone, mirror it elsewhere). */ do_action( 'nahnu_video_synced', $post_id, $bunny_video, $is_new, $args ); -
/** * Fires after a category/tag is attached to a video via the inline chip editor * (Video Control's edit modal). */ do_action( 'nahnu_video_term_added', $post_id, $taxonomy, $term_id ); -
/** * Fires after a category/tag is detached from a video. */ do_action( 'nahnu_video_term_removed', $post_id, $taxonomy, $term_id ); -
/** * Whether a webhook for a video that has no post yet should import it (e.g. * something uploaded directly in the Bunny dashboard). */ apply_filters( 'nahnu_video_webhook_imports_new', true, $guid ); -
/** * Fires for every authenticated Bunny webhook call for this plugin's library, * before Nahnu Video acts on it. */ do_action( 'nahnu_video_webhook_received', $guid, $status, $payload ); -
apply_filters( 'nahnu_video_can_edit_terms', current_user_can( 'edit_post', $post_id ), $post_id, get_current_user_id() ); -
apply_filters( 'nahnu_video_grid_render_args', $atts ); -
apply_filters( 'nahnu_video_playlist_render_args', $atts );
Generated from Nahnu Video For Bunny Stream (Bunny.net)'s GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: