Filter Reference
The following filters are available to use to extend or modify the functionality of Seriously Simple Podcasting:
ssp_podcast_post_types
Location: This filter is run during the retrieval of all the podcast post types. You can use this to alter the post types being retrieved for the check.
Arguments:
- $types - array The array of podcast post types.
- $include_podcast - boolean Indicates whether the podcast post type is included in the array.
Code reference: php/includes/ssp-functions.php
ssp_is_podcast_download
Location: This filter is run during the check for whether a podcast file is being downloaded or not. You can use this to alter the requirements for the check.
Arguments:
- $download - boolean Indicates if an episode download is happening or not.
- $episode - integer The post ID of the podcast episode.
Code reference: php/includes/ssp-functions.php
ssp_episode_query_args
Location: This filter is run during when all the podcast episodes are being fetched. You can use this to alter the arguments for query that fetches the episodes.
Arguments:
- $args - array The query arguments.
- $context - string The context of the query (e.g. feed).
Code reference: php/includes/ssp-functions.php
ssp_feed_access
Location: This filter is run when deciding if the current user should have access to the podcast feed or not. It defaults to allowing access, but can be filtered based an any criteria you need.
Arguments:
- $give_access - boolean Whether or not to give feed access to the current user (defaults to true).
- $series_id - integer The ID of the series for the current feed (if it is a series-specific feed).
Code reference: templates/feed-podcast.php
ssp_feed_number_of_posts
Location: This filter is run when deciding how many episodes to show in the podcast RSS feed.
Arguments:
- $n - integer The number of episodes to fetch, defaults to the value of the posts_per_rss option.
Code reference: templates/feed-podcast.php
ssp_feed_channel_link_tag
Location: This filter is run on the website URL in the podcast RSS feed.
Arguments:
- $url - string Your website URL, defaults to the home URL of your website.
- $series - string The slug of the current series, if you are using a series-specific RSS feed.
Code reference: templates/feed-podcast.php
ssp_feed_item_content
Location: This filter is run on content that will be included in the content:encoded
tag of the podcast RSS feed.
Arguments:
- $content - string The content of the tag.
- $episode_id - integer The post ID of the current episode.
Code reference: templates/feed-podcast.php
ssp_feed_item_itunes_summary
Location: This filter is run on content that will be included in the itunes:summary
tag of the podcast RSS feed.
Arguments:
- $content - string The content of the tag.
- $episode_id - integer The post ID of the current episode.
Code reference: templates/feed-podcast.php
ssp_feed_item_gp_description
Location: This filter is run on content that will be included in the googleplay:description
tag of the podcast RSS feed.
Arguments:
- $content - string The content of the tag.
- $episode_id - integer The post ID of the current episode.
Code reference: templates/feed-podcast.php
ssp_feed_item_description
Location: This filter is run on content that will be included in the description
tag of the podcast RSS feed.
Arguments:
- $content - string The content of the tag.
- $episode_id - integer The post ID of the current episode.
Code reference: templates/feed-podcast.php
ssp_feed_item_itunes_subtitle
Location: This filter is run on content that will be included in the itunes:subtitle
tag of the podcast RSS feed.
Arguments:
- $content - string The content of the tag.
- $episode_id - integer The post ID of the current episode.
Code reference: templates/feed-podcast.php
ssp_settings_fields
Location: This filter is run on the fields that are available in the podcast settings. You can use it to add additional settings.
Arguments:
- $settings - array The complete settings array.
Code reference: php/classes/handlers/class-settings-handler.php
ssp_feed_slug
Location: This filter is run on the slug for the podcast feed URL. You can use it to modify the feed URL slug.
Arguments:
- $slug - string The podcast feed URL slug, defaults to podcast.
Code reference: php/classes/controllers/class-admin-controller.php
ssp_archive_slug
Location: This filter is run on the slug for the episode archive URL. You can use it to modify the URL slug.
Arguments:
- $slug - string The podcast episode archive URL slug, defaults to podcast.
Code reference: php/classes/controllers/class-admin-controller.php
ssp_register_post_type_args
Location: This filter is run on the arguments used with register_post_type()
to alter the podcast
post type.
Arguments:
- $args - array The array of arguments.
Code reference: php/classes/controllers/class-admin-controller.php
ssp_series_slug
Location: This filter is run on the slug used for the series
taxonomy.
Arguments:
- $slug - string The slug, defaults to series.
Code reference: php/classes/controllers/class-admin-controller.php
ssp_register_taxonomy_args
Location: This filter is run on the arguments used with register_taxonomy()
to alter the series
taxonomy.
Arguments:
- $args - array The array of arguments.
- $taxonomy - string The name of the taxonomy being registered (series).
Code reference: php/classes/controllers/class-admin-controller.php
ssp_use_post_tags
Location: This filter is run to check whether you would like to use post tags for podcast episodes or not.
Arguments:
- $use_tags - boolean Indicates if tags should be used for podcast episodes or not, defaults to true.
Code reference: php/classes/controllers/class-admin-controller.php
ssp_admin_columns_episodes
Location: This filter is run on the array of columns added to podcast episodes. You can use it to add additional columns to the podcast list table.
Arguments:
- $columns - array The columns being added.
Code reference: php/classes/controllers/class-admin-controller.php
ssp_admin_columns_series
Location: This filter is run on the array of columns added to podcast series. You can use it to add additional columns to the podcast series list table.
Arguments:
- $columns - array The columns being added.
Code reference: php/classes/controllers/class-admin-controller.php
ssp_episode_fields
Location: This filter is run on the array of fields that are available for podcast episodes. You can use it to add additional fields to podcast episodes.
Arguments:
- $fields - array The fields being added.
Code reference: php/classes/controllers/class-admin-controller.php
ssp_feed_template_file
Location: This filter is run on the path to the feed template file. You can use it to specify a custom feed template file - if nothing is specified then the plugin's built-in feed template file is used.
Arguments:
- $file - string The complete file name of the feed template file, defaults to your-theme/feed-podcast.php (if it exists).
Code reference: php/classes/controllers/class-feed-controller.php
ssp_rss_stylesheet
Location: This filter is run on the URL for the podcast RSS feed stylesheet. You can use it to supply your own stylesheet for the RSS feed by specifying a URL to the XSL file.
Arguments:
- $url - string The URL of the XSL file for styling the RSS feed, defaults to templates/feed-stylesheet.xsl in your plugin folder.
ssp_episode_download_link
Location: This filter is run on the episode download link. You can use it to modify the URL in the link.
Arguments:
- $link - string The URL pointing to the file download.
- $episode_id - integer The post ID of the podcast episode.
- $file - string The full path to the episode audio file.
Code reference: php/classes/controllers/class-episode-controller.php
ssp_media_player
Location: This filter is run on the media player output. You can use it to add your own custom content before and after the media player, or override the media player being used.
Arguments:
- $player - string The HTML content which displays the media player.
- $src_file - string The full path to the episode media file
- $episode_id - integer The post ID of the podcast episode
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_show_episode_details
Location: This filter is run to check if the episode details should be displayed beneath the audio player.
Arguments:
- $display - boolean Indicates whether to show the episode details or not.
- $episode_id - integer The post ID of the podcast episode.
- $context - string The context in which the meta data is being displayed - either content, excerpt, shortcode or embed.
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_episode_meta
Location: This filter is run on the episode meta data HTML. You can use it to modify the meta data that is displayed.
Arguments:
- $meta - string The HTML of the episode meta data.
- $post_id - integer The post ID of the podcast episode.
- $context - string The context in which the meta data is being displayed - either content, excerpt, shortcode or embed.
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_episode_meta_details
Location: This filter is run on the episode meta data array. You can use it to modify the meta data that is displayed.
Arguments:
- $meta - string The array of the episode meta data.
- $episode_id - integer The post ID of the podcast episode.
- $context - string The context in which the meta data is being displayed - either content, excerpt, shortcode or embed.
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_file_size
Location: This filter is run on the audio file size data when it is determined.
Arguments:
- $size - array The array of file size data - array keys are raw and formatted.
- $file - string The full path to the audio file.
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_file_size_formatted
Location: This filter is run on the audio file size string as it is formatted for display.
Arguments:
- $formatted_size - string The formatted audio file size.
- $size - integer The raw file size of the episode in bytes.
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_file_duration
Location: This filter is run on the audio file duration when it is determined.
Arguments:
- $size - string The audio file duration is would be displayed on the frontend.
- $file - string The full path to the audio file.
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_episode_image
Location: This filter is run on the image for the episode as it is fetched.
Arguments:
- $image - string The episode image URL.
- $id - integer The post ID of the podcast episode.
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_episode_enclosure
Location: This filter is run on the audio file (enclosure) for the episode as it is fetched.
Arguments:
- $enclosure - string The full URL of the enclosure.
- $episode_id - integer The post ID of the podcast episode.
Code reference: php/classes/controllers/class-episode-controller.php
ssp_audio_player
Location: This filter is run on the audio player when it is displayed on the frontend. You can use it to load an alternative audio player if you do not wish to use WordPress' built-in one.
Arguments:
- $player - string The full HTML of the audio player.
- $src - string The full URL to the audio file.
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_episode_from_file
Location: This filter is run when fetching the podcast episode from the audio file URL.
Arguments:
- $episode - object The post object of the podcast episode.
- $file - string The full URL of the audio file.
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_feed_url
Location: This filter is run when determining the podcast feed URL to display in the podcast RSS meta tag.
Arguments:
- $feed_url - string The URL of the podcast feed.
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_rss_meta_tag
Location: This filter is run on the HTML generated for the podcast RSS meta tag.
Arguments:
- $html - string The full HTML for the podcast RSS meta tag.
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_show_generator_tag
Location: This filter is run on the Seriously Simple Podcasting generator meta tag that is displayed in your site header. You can use it to hide the generator tag if you need to.
Arguments:
- $show - boolean Indicates whether the generator meta tag should be shown or not.
- $type - string Indicates the type of page being loaded (either html or xhtml).
Code reference: php/classes/controllers/class-frontend-controller.php
ssp_widget_recent_episodes_args
Location: This filter is run on arguments used to determine which episodes show up in the Recent Episodes widget.
Arguments:
- $args - array The full array of query arguments.
Code reference: php/classes/widgets/class-recent-episodes.php
ssp_widget_series_episodes_args
Location: This filter is run on arguments used to determine which episodes show up in the Series widget.
Arguments:
- $args - array The full array of query arguments.
Code reference: php/classes/widgets/class-series.php