Videopack 4.10.7 has 7 actions and 33 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.
// Run your own code when Videopack fires an action
add_action( 'videopack_pre_thumbnail_media_library_ui', function( $post ) {
// Your code runs here.
}, 10, 1 );
// Change a value Videopack is about to use
add_filter( 'videopack_source_url', function( $encodevideo_info ) {
// Change $encodevideo_info here.
return $encodevideo_info;
}, 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
-
videopack_source_url
filter/** * Filters a video <source> URL. */ apply_filters( 'videopack_source_url', $encodevideo_info[ $format ]['url'] ); -
/** * Filters whether to log file downloads. */ apply_filters( 'kg_file_download_logger_start', false ); -
kgvid_aac_encoders
filter/** * Filter the preferred FFMPEG AAC encoders. */ apply_filters( 'kgvid_aac_encoders', $aac_array ); -
kgvid_allowed_query_var_atts
filter/** * Filters the allowed attributes that can be changed via query attributes in * the URL. */ apply_filters( 'kgvid_allowed_query_var_atts', $allowed_query_var_atts ); -
kgvid_attachment_meta
filter/** * Filters the custom Videopack attachment meta. */ apply_filters( 'kgvid_attachment_meta', $kgvid_postmeta ); -
/** * Filters the available video players. */ apply_filters( 'kgvid_available_video_players', $players ); -
kgvid_change_oembed_data
filter/** * Filters the oEmbed data for a given post. */ apply_filters( 'kgvid_change_oembed_data', $data, $post, $width, $height ); -
/** * Filters the default custom Videopack attachment meta. Allows addition of new * meta keys. */ apply_filters( 'kgvid_default_attachment_meta', $default_meta ); -
kgvid_default_options
filter/** * Filters the default Videopack plugin options. Allows addition of new * options. */ apply_filters( 'kgvid_default_options', $options ); -
kgvid_default_shortcode_atts
filter/** * Filters the default shortcode attributes. */ apply_filters( 'kgvid_default_shortcode_atts', $default_atts ); -
kgvid_embedcode
filter/** * Filters the embed code displayed in video players. */ apply_filters( 'kgvid_embedcode', $iframecode, $iframeurl, $id, $query_atts ); -
kgvid_encodevideo_info
filter/** * Filter the data about available video formats. */ apply_filters( 'kgvid_encodevideo_info', $encodevideo_info, $movieurl, $post_id ); -
kgvid_filter_url
filter/** * Filters the URL in the Videopack shortcode. */ apply_filters( 'kgvid_filter_url', trim( $content ) ); -
kgvid_gallery_page
filter/** * Filters the video gallery page HTML. */ apply_filters( 'kgvid_gallery_page', $code, $kgvid_video_id ); -
kgvid_generate_encode_array
filter/** * Filter the array of FFMPEG options for encoding a video. */ apply_filters( 'kgvid_generate_encode_array', $encode_array, $input, $output, $movie_info, $format, $width, $height, $rotate, $nostdin ); -
/** * Filters the video description. */ apply_filters( 'kgvid_generate_video_description', $description, $query_atts ); -
kgvid_get_generating_old
filter/** * Filters the arguments used to retrieve the thumbnails or videos that need to * be generated. */ apply_filters( 'kgvid_get_generating_old', $args, $type ); -
kgvid_get_video_dimensions
filter/** * Filter the video metadata retrieved from FFMPEG output. */ apply_filters( 'kgvid_get_video_dimensions', $movie_info, $video, $output, $codec_output ); -
kgvid_gifmode_atts
filter/** * Filters the attributes that are set when video players have GIF mode * enabled. */ apply_filters( 'kgvid_gifmode_atts', $gifmode_atts ); -
kgvid_insert_shortcode_atts
filter/** * Filters the attributes of the shortcode that are inserted into the Classic * Editor from the Insert into post button. */ apply_filters( 'kgvid_insert_shortcode_atts', array( 'width', 'height', ) ); -
kgvid_shortcode
filter/** * Filters the shortcode output. */ apply_filters( 'kgvid_shortcode', $code, $query_atts, $content ); -
kgvid_shortcode_atts
filter/** * Filters the shortcode attributes. */ apply_filters( 'kgvid_shortcode_atts', $query_atts ); -
kgvid_single_video_code
filter/** * Filters the video player code output. */ apply_filters( 'kgvid_single_video_code', $code, $query_atts, $atts, $content, $post_id ); -
kgvid_video_formats
filter/** * Filters the video formats available for encoding and video playback. */ apply_filters( 'kgvid_video_formats', $video_formats, $return_replace, $return_customs, $return_dontembeds ); -
kgvid_video_variables
filter/** * Filters the video variables. */ apply_filters( 'kgvid_video_variables', $video_variables, $query_atts, $encodevideo_info ); -
/** * Filters the list of Videopack-compatible video file extensions. */ apply_filters( 'videopack_compatible_extensions', $compatible ); -
videopack_download_link
filter/** * Filters embedded video download link. */ apply_filters( 'videopack_download_link', $content ); -
videopack_post_save_thumb
filter/** * Filters the URL of newly-saved thumbnail images. */ apply_filters( 'videopack_post_save_thumb', $thumb_url, $thumb_id ); -
/** * Fires before the thumbnail-generation UI is rendered. */ do_action( 'videopack_pre_thumbnail_media_library_ui', $post ); -
/** * Filters the image editor used to save the canvas thumbnail. Allows resizing, * reducing quality, etc. */ apply_filters( 'videopack_save_canvas_thumb_image_editor', $editor ); -
/** * Filters the final path and URL of the poster file when avoiding duplicates. */ apply_filters( 'videopack_save_thumb_location', array( 'path' => $uploads['path'] . '/' . $posterfile_noindex . $thumb_index . '.jpg', 'url' => $uploads['url'] . '/' . $posterfile_noindex . $thumb_index . '.jpg', ), $post_id, $post_name, $thumb_index, $posterfile_noindex ); -
videopack_send_to_editor_url
filter/** * Filters the URL of the video to be inserted into the Classic Editor from the * Insert into post button. */ apply_filters( 'videopack_send_to_editor_url', wp_get_attachment_url( $attachment_id ) ); -
videopack_settings_tabs
filter/** * Filters the tabs for the Videopack settings page. */ apply_filters( 'videopack_settings_tabs', $settings_tabs ); -
embed_head
actiondo_action( 'embed_head' ); -
kg_file_download_logger_end
actiondo_action( 'kg_file_download_logger_end', $download_log, $complete ); -
do_action( 'kgvid_enqueue_shortcode_scripts' ); -
do_action( 'videopack_cron_new_attachment', $post_id ); -
videopack_fs_loaded
actiondo_action( 'videopack_fs_loaded' ); -
wp_video_shortcode_library
filterapply_filters( 'wp_video_shortcode_library', 'mediaelement' );
Generated from Videopack'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: