Documentation

Plugin filters

Every filter hook for changing imported post data, embeds, player settings, batch sizes and compatibility with your theme — each with its parameters and an example.

  • cbc_allow_auto_import

    Filter that can prevent all automatic imports from running.

  • cbc_allow_single_video_import

    By default, when trying to import a new single video, the plugin will display a simple form asking for the video ID.

  • cbc_allow_video_import

    Using this filter you can prevent a certain video from being imported into a WordPress post.

  • cbc_allow_youtube_server_key_update

    Allow (true) or deny (false) updating the YouTube API server key when the settings are saved.

  • cbc_apply_filename_suffix

    When video image importing into WordPress Media Gallery is enabled from plugin settings, the plugin will automatically import the video image and, by default, apply a suffix “-youtube-thumbnail” to the file name.

  • cbc_attachment_file_exists

    Filter whether the file of an attachment exists.

  • cbc_automatic_import_message

    Filter the countdown/status message shown for a playlist’s automatic import.

  • cbc_automatic_import_start_on_hook

    Removed in Video Hub 2.0.

  • cbc_check_video_status

    If video status checking is allowed from plugin settings, the plugin will query YouTube API at most once every 24h in order to check if the video being displayed wasn’t deleted from YouTube or its privacy settings modified and made…

  • cbc_compatibility

    Declare that current WP theme is compatible with the plugin.

  • cbc_compatibility_dislikes_meta

    When importing videos for compatible WordPress theme, use this filter to specify the custom field name where the plugin should store the number of dislikes for all future imported videos.

  • cbc_compatibility_duration_meta

    When importing videos for compatible WordPress theme, use this filter to specify the custom field name where the plugin should store the video duration in seconds for all future imported videos.

  • cbc_compatibility_embed_meta

    When importing a new video for your WordPress theme, if the theme requires a certain custom field to be filled automatically, use this filter to pass the field name to the plugin.

  • cbc_compatibility_human_duration_meta

    When importing videos for compatible WordPress theme, use this filter to specify the custom field name where the plugin should store the formatted video duration (HH:MM:SS) for all future imported videos.

  • cbc_compatibility_image_meta

    When importing videos for your WordPress theme, your theme might ask for the video image/banner URL.

  • cbc_compatibility_likes_meta

    When importing videos for compatible WordPress theme, use this filter to specify the custom field name where the plugin should store the number of likes for all future imported videos.

  • cbc_compatibility_post_format

    When importing videos for your WordPress theme, you might want to set a different post format, other than the default “video” set by the plugin.

  • cbc_compatibility_post_type

    Used with filter cbc compatibility to specify the post type used by the currently active WordPress theme for video posts.

  • cbc_compatibility_tag_taxonomy

    Filter used to specify the tag taxonomy that the tags retrieved from YouTube API will by imported as.

  • cbc_compatibility_taxonomy

    Used to specify the taxonomy under which the theme creates video posts.

  • cbc_compatibility_theme_name

    When making your WordPress theme compatible with the plugin, use this filter to pass to the plugin the theme name that you want to see displayed in your WordPress video importing screens.

  • cbc_compatibility_theme_url

    When making your WordPress theme compatible with the plugin, use this filter to pass to the plugin the theme URL that you want to see displayed into the plugin pages.

  • cbc_compatibility_url_meta

    Use this filter to set a custom field with the video URL when importing new videos for your WordPress theme and your theme requires the video URL to be filled.

  • cbc_compatibility_views_meta

    When importing videos for compatible WordPress theme, use this filter to specify the custom field name where the plugin should store the number of views for all future imported videos.

  • cbc_cpt_with_front

    Set the with_front rewrite option for the video custom post type permalinks.

  • cbc_embed_after

    Filter HTML output rendered immediately after the video player.

  • cbc_embed_allowed

    When video embedding is done by the plugin, this filter gives you the choice to prevent videos from being embedded automatically.

  • cbc_embed_before

    Filter HTML output rendered immediately before the video player.

  • cbc_embed_css_class

    Filter the array of extra CSS classes added to the video player container, for styling the embed.

  • cbc_embed_html_container

    Filter the full HTML of the video container, allowing third-party code to modify the markup of the embedded player.

  • cbc_hidden_server_key_field_message

    Filter the message shown in place of the server-key field when it is hidden (see cbc_show_server_key_form_field).

  • cbc_image_import_timeout

    Filter the HTTP timeout (in seconds) used when downloading a video thumbnail during image import.

  • cbc_import_log_entry

    Filter an event before it is added to the activity log of an automatic import.

  • cbc_js_embed

    Choose how the video is embedded: return true to use the plugin’s JavaScript player, or false to output a plain YouTube iframe.

  • cbc_nocookie_embed

    Force the privacy-enhanced youtube-nocookie.com domain for the embed, regardless of the per-post or global setting.

  • cbc_override_post_video_settings

    Filter whether the player settings of the plugin are used for a video post instead of the player settings saved in the post’s Video settings box.

  • cbc_player_max_height

    Filter the maximum height of every player, set by the Fit in the window option (Settings, tab Embed options).

  • cbc_settings_export_data

    Filter the data of the settings export file, created with the Export button of the Settings page.

  • cbc_show_php_version_warning

    Show (true) or hide (false) the admin notice warning that the server PHP version is not actively supported.

  • cbc_show_server_key_form_field

    Show (true) or hide (false) the legacy YouTube API server-key input field on the settings page.

  • cbc_tag_taxonomy_with_front

    Set the with_front rewrite option for the video tag taxonomy permalinks.

  • cbc_taxonomy_with_front

    Set the with_front rewrite option for the video category taxonomy permalinks.

  • cbc_thumbnails_import_batch_size

    Filter the number of posts checked in a single request of the Thumbnails tool.

  • cbc_vertical_player_max_height

    Filter the maximum height of vertical players, like the players of YouTube Shorts, so they are never taller than the screen.

  • cbc_video_aspect_ratio

    Filter the aspect ratio used to embed a video.

  • cbc_video_description

    Filter on video description.

  • cbc_video_duration_allowed

    Filter whether a video is imported by an automatic import that has a Video duration range.

  • cbc_video_embed_filter_priority

    Filter the priority used when the automatic video embed is hooked into the_content.

  • cbc_video_is_short

    Filter whether a video is treated as a YouTube Short.

  • cbc_video_post_comment_status

    Filter that allows you to change the default comment status for the current video post before inserting it into the database.

  • cbc_video_post_content

    Video post content filter that runs before inserting the post into the database.

  • cbc_video_post_date

    Filter for the video post date that runs before the post is inserted into the database.

  • cbc_video_post_embed_below_content

    Control whether the video is embedded below the post content (true) or above it (false), globally for all video posts.

  • cbc_video_post_embed_options

    Filter the player embed settings (size, autoplay, controls, aspect ratio, etc.) right before the video is rendered.

  • cbc_video_post_excerpt

    Video post excerpt filter that runs before inserting the post into the database.

  • cbc_video_post_ping_status

    Filter that allows you to change the default ping status for the current video post before inserting it into the database.

  • cbc_video_post_status

    The video post status for the post that will be inserted into the database.

  • cbc_video_post_title

    Filter on post title, right before inserting the post into the database.

  • cbc_video_settings

    Filter the player settings of a video post.

  • cbc_video_status_timeout

    By default, video status checking is done at most once every 24h.

  • cbc_video_thumbnail_urls

    Filter the thumbnail URLs of a video, tried in order until one is downloaded.

  • cbc_video_title

    Filter on video title.

  • cbc_video_update_batch_size

    Filter the number of posts processed in a batch of the Update videos tool.

  • cbc_video_update_post_types

    Filter the post types whose video posts are updated by the Update videos tool.

  • cbc_videos_delete_batch_size

    Filter the number of video posts deleted in a single request of the Delete videos tool.

  • cbc_videos_delete_image

    Filter whether the featured image of a video post deleted permanently by the Delete videos tool is deleted too.

  • cbc_youtube_api_request_timeout

    Filter the HTTP timeout (in seconds) for requests made to the YouTube Data API.

  • cbc_yt_error_backoff_minutes

    Filter the base delay, in minutes, before an automatic import that returned a YouTube error is tried again.

  • cbc_yt_error_unpublish_threshold

    Filter how many consecutive YouTube errors an automatic import can return before it is switched to draft and taken out of the import queue.

  • wpythub_is_video_visible

    Filter whether the video player is embedded on the current page.

  • wpythub_playlist_theme_script_version

    Filter the version of the script of a playlist theme, used to refresh browser caches.

  • wpythub_tinymce_enabled

    Filter whether the “Embed video” button of Video Hub is added to the classic editor (TinyMCE) of a post type.

Start importing in minutes

Bring your YouTube content into WordPress and let it update itself. Includes automatic updates and support.