Videopack icon
Media, Galleries & Sliders

Videopack hooks reference

  • By Kyle Gilman
  • v4.10.7
  • Updated

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.

functions.phpyour child theme
// 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

  • src/public/videopack-public.php line 1205 · used in 2 places
    /**
     * Filters a video <source> URL.
     */
    apply_filters( 'videopack_source_url', $encodevideo_info[ $format ]['url'] );
  • src/public/videopack-public.php line 188
    /**
     * Filters whether to log file downloads.
     */
    apply_filters( 'kg_file_download_logger_start', false );
  • src/admin/videopack-ffmpeg.php line 125
    /**
     * Filter the preferred FFMPEG AAC encoders.
     */
    apply_filters( 'kgvid_aac_encoders', $aac_array );
  • src/public/videopack-public.php line 1916
    /**
     * 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 );
  • src/admin/videopack-admin.php line 469
    /**
     * Filters the custom Videopack attachment meta.
     */
    apply_filters( 'kgvid_attachment_meta', $kgvid_postmeta );
  • src/admin/videopack-admin.php line 1524
    /**
     * Filters the available video players.
     */
    apply_filters( 'kgvid_available_video_players', $players );
  • src/public/videopack-public.php line 539
    /**
     * Filters the oEmbed data for a given post.
     */
    apply_filters( 'kgvid_change_oembed_data', $data, $post, $width, $height );
  • src/admin/videopack-admin.php line 402
    /**
     * Filters the default custom Videopack attachment meta. Allows addition of new
     * meta keys.
     */
    apply_filters( 'kgvid_default_attachment_meta', $default_meta );
  • src/admin/videopack-admin.php line 163
    /**
     * Filters the default Videopack plugin options. Allows addition of new
     * options.
     */
    apply_filters( 'kgvid_default_options', $options );
  • src/public/videopack-public.php line 1883
    /**
     * Filters the default shortcode attributes.
     */
    apply_filters( 'kgvid_default_shortcode_atts', $default_atts );
  • src/public/videopack-public.php line 1611
    /**
     * Filters the embed code displayed in video players.
     */
    apply_filters( 'kgvid_embedcode', $iframecode, $iframeurl, $id, $query_atts );
  • src/admin/videopack-ffmpeg.php line 519
    /**
     * Filter the data about available video formats.
     */
    apply_filters( 'kgvid_encodevideo_info', $encodevideo_info, $movieurl, $post_id );
  • src/public/videopack-public.php line 890
    /**
     * Filters the URL in the Videopack shortcode.
     */
    apply_filters( 'kgvid_filter_url', trim( $content ) );
  • src/admin/videopack-ffmpeg.php line 1023
    /**
     * 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 );
  • src/public/videopack-public.php line 810
    /**
     * Filters the video description.
     */
    apply_filters( 'kgvid_generate_video_description', $description, $query_atts );
  • src/admin/videopack-admin-ajax.php line 1176
    /**
     * Filters the arguments used to retrieve the thumbnails or videos that need to
     * be generated.
     */
    apply_filters( 'kgvid_get_generating_old', $args, $type );
  • src/admin/videopack-ffmpeg.php line 682
    /**
     * Filter the video metadata retrieved from FFMPEG output.
     */
    apply_filters( 'kgvid_get_video_dimensions', $movie_info, $video, $output, $codec_output );
  • src/public/videopack-public.php line 1127
    /**
     * Filters the attributes that are set when video players have GIF mode
     * enabled.
     */
    apply_filters( 'kgvid_gifmode_atts', $gifmode_atts );
  • src/admin/videopack-admin.php line 3781
    /**
     * 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', ) );
  • src/public/videopack-public.php line 2064
    /**
     * Filters the shortcode output.
     */
    apply_filters( 'kgvid_shortcode', $code, $query_atts, $content );
  • src/public/videopack-public.php line 1979
    /**
     * Filters the shortcode attributes.
     */
    apply_filters( 'kgvid_shortcode_atts', $query_atts );
  • src/public/videopack-public.php line 1742
    /**
     * Filters the video player code output.
     */
    apply_filters( 'kgvid_single_video_code', $code, $query_atts, $atts, $content, $post_id );
  • src/admin/videopack-admin.php line 699
    /**
     * Filters the video formats available for encoding and video playback.
     */
    apply_filters( 'kgvid_video_formats', $video_formats, $return_replace, $return_customs, $return_dontembeds );
  • src/public/videopack-public.php line 1166
    /**
     * Filters the video variables.
     */
    apply_filters( 'kgvid_video_variables', $video_variables, $query_atts, $encodevideo_info );
  • src/public/videopack-public.php line 831
    /**
     * Filters the list of Videopack-compatible video file extensions.
     */
    apply_filters( 'videopack_compatible_extensions', $compatible );
  • src/admin/videopack-admin.php line 3597
    /**
     * Filters the URL of newly-saved thumbnail images.
     */
    apply_filters( 'videopack_post_save_thumb', $thumb_url, $thumb_id );
  • src/admin/videopack-admin.php line 3115
    /**
     * Fires before the thumbnail-generation UI is rendered.
     */
    do_action( 'videopack_pre_thumbnail_media_library_ui', $post );
  • src/admin/videopack-admin-ajax.php line 471
    /**
     * Filters the image editor used to save the canvas thumbnail. Allows resizing,
     * reducing quality, etc.
     */
    apply_filters( 'videopack_save_canvas_thumb_image_editor', $editor );
  • src/admin/videopack-admin.php line 3472
    /**
     * 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 );
  • src/admin/videopack-admin.php line 3765
    /**
     * 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 ) );
  • src/admin/videopack-admin.php line 1322
    /**
     * Filters the tabs for the Videopack settings page.
     */
    apply_filters( 'videopack_settings_tabs', $settings_tabs );
  • embed_head

    action
    src/public/partials/embeddable-video.php line 39
    do_action( 'embed_head' );
  • src/public/videopack-public.php line 214
    do_action( 'kg_file_download_logger_end', $download_log, $complete );
  • src/public/videopack-public.php line 573
    do_action( 'kgvid_enqueue_shortcode_scripts' );
  • src/admin/videopack-ffmpeg.php line 2037
    do_action( 'videopack_cron_new_attachment', $post_id );
  • video-embed-thumbnail-generator.php line 280
    do_action( 'videopack_fs_loaded' );
  • src/public/videopack-public.php line 676
    apply_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: