Filter Reference

The following filters are available for you to use to extend or modify the functionality of Seriously Simple Podcasting:

wp_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:

  1. $types – array The array of podcast post types.
  2. $include_podcast – boolean Indicates whether the podcast post type is included in the array.

Code reference: includes/ssp-functions.php

wp_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:

  1. $download – boolean Indicates if an episode download is happening or not.
  2. $episodeinteger The post ID of the podcast episode.

Code reference: includes/ssp-functions.php

wp_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:

  1. $args – array The query arguments.
  2. $context – string The context of the query (e.g. feed).

Code reference: includes/ssp-functions.php

wp_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:

  1. $give_access – boolean Whether or not to give feed access to the current user (defaults to true).
  2. $series_id – integer The ID of the series for the current feed (if it is a series-specific feed).

wp_feed_number_of_posts

Location: This filter is run when deciding how many episodes to show in the podcast RSS feed.

Arguments:

  1. $n – integer The number of episodes to fetch, defaults to the value of the posts_per_rss option.

Code reference: templates/feed-podcast.php

wp_feed_channel_link_tag

Location: This filter is run on the website URL in the podcast RSS feed.

Arguments:

  1. $url – string Your website URL, defaults to the home URL of your website.
  2. $seriesstring The slug of the current series, if you are using a series-specific RSS feed.

Code reference: templates/feed-podcast.php

wp_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:

  1. $content – string The content of the tag.
  2. $episode_id – integer The post ID of the current episode.

Code reference: templates/feed-podcast.php

wp_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:

  1. $content – string The content of the tag.
  2. $episode_id – integer The post ID of the current episode.

Code reference: templates/feed-podcast.php

wp_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:

  1. $content – string The content of the tag.
  2. $episode_id – integer The post ID of the current episode.

Code reference: templates/feed-podcast.php

wp_feed_item_description

Location: This filter is run on content that will be included in the description tag of the podcast RSS feed.

Arguments:

  1. $content – string The content of the tag.
  2. $episode_id – integer The post ID of the current episode.

Code reference: templates/feed-podcast.php

wp_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:

  1. $content – string The content of the tag.
  2. $episode_id – integer The post ID of the current episode.

Code reference: templates/feed-podcast.php

wp_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:

  1. $settings – array The complete settings array.

Code reference: includes/class-ssp-settings.php

wp_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:

  1. $slug – string The podcast feed URL slug, defaults to podcast.

Code reference: includes/class-ssp-admin.php

wp_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:

  1. $slug – string The podcast episode archive URL slug, defaults to podcast.

Code reference: includes/class-ssp-admin.php

wp_register_post_type_args

Location: This filter is run on the arguments used with register_post_type() to alter the podcast post type.

Arguments:

  1. $args – array The array of arguments.

Code reference: includes/class-ssp-admin.php

wp_series_slug

Location: This filter is run on the slug used for the series taxonomy.

Arguments:

  1. $slug – string The slug, defaults to series.

Code reference: includes/class-ssp-admin.php

wp_register_taxonomy_args

Location: This filter is run on the arguments used with register_taxonomy() to alter the series taxonomy.

Arguments:

  1. $args – array The array of arguments.
  2. $taxonomystring The name of the taxonomy being registered (series).

Code reference: includes/class-ssp-admin.php

wp_use_post_tags

Location: This filter is run to check whether you would like to use post tags for podcast episodes or not.

Arguments:

  1. $use_tags – boolean Indicates if tags should be used for podcast episodes or not, defaults to true.

Code reference: includes/class-ssp-admin.php

wp_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:

  1. $columns – array The columns being added.

Code reference: includes/class-ssp-admin.php

wp_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:

  1. $columns – array The columns being added.

Code reference: includes/class-ssp-admin.php

wp_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:

  1. $fields – array The fields being added.

Code reference: includes/class-ssp-admin.php

wp_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:

  1. $file – string The complete file name of the feed template file, defaults to your-theme/feed-podcast.php (if it exists).

Code reference: includes/class-ssp-admin.php

wp_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:

  1. $urlstring The URL of the XSL file for styling the RSS feed, defaults to templates/feed-stylesheet.xsl in your plugin folder.

wp_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:

  1. $link – string The URL pointing to the file download.
  2. $episode_id – integer The post ID of the podcast episode.
  3. $file – string The full path to the episode audio file.

Code reference: includes/class-ssp-frontend.php

wp_show_audio_player

Location: This filter is run to check if the episode audio player should be displayed.

Arguments:

  1. $show_player – boolean Indicates whether to show the episode details or not
  2. $context – string The context in which the audio player is being displayed – either contentexcerpt, shortcode or embed.

Code reference: includes/class-ssp-frontend.php

wp_show_episode_details

Location: This filter is run to check if the episode details should be displayed beneath the audio player.

Arguments:

  1. $display – boolean Indicates whether to show the episode details or not.
  2. $episode_id – integer The post ID of the podcast episode.
  3. $context – string The context in which the meta data is being displayed – either contentexcerpt, shortcode or embed.

Code reference: includes/class-ssp-frontend.php

wp_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:

  1. $meta – string The HTML of the episode meta data.
  2. $post_id – integer The post ID of the podcast episode.
  3. $context – string The context in which the meta data is being displayed – either contentexcerpt, shortcode or embed.

Code reference: includes/class-ssp-frontend.php

wp_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:

  1. $meta – string The array of the episode meta data.
  2. $episode_id – integer The post ID of the podcast episode.
  3. $context – string The context in which the meta data is being displayed – either contentexcerpt, shortcode or embed.

Code reference: includes/class-ssp-frontend.php

wp_file_size

Location: This filter is run on the audio file size data when it is determined.

Arguments:

  1. $size – array The array of file size data – array keys are raw and formatted.
  2. $file – string The full path to the audio file.

Code reference: includes/class-ssp-frontend.php

wp_file_size_formatted

Location: This filter is run on the audio file size string as it is formatted for display.

Arguments:

  1. $formatted_size – string The formatted audio file size.
  2. $size – integer The raw file size of the episode in bytes.

Code reference: includes/class-ssp-frontend.php

wp_file_duration

Location: This filter is run on the audio file duration when it is determined.

Arguments:

  1. $size – string The audio file duration is would be displayed on the frontend.
  2. $file – string The full path to the audio file.

Code reference: includes/class-ssp-frontend.php

wp_attachment_mimetype

Location: This filter is run on the MIME type for the audio file as it is determined.

Arguments:

  1. $mime_type – string The file MIME type.
  2. $id – integer The attachment ID of the audio file.

Code reference: includes/class-ssp-frontend.php

wp_episode_image

Location: This filter is run on the image for the episode as it is fetched.

Arguments:

  1. $image – string The episode image URL.
  2. $id – integer The post ID of the podcast episode.

Code reference: includes/class-ssp-frontend.php

wp_episode_enclosure

Location: This filter is run on the audio file (enclosure) for the episode as it is fetched.

Arguments:

  1. $enclosure – string The full URL of the enclosure.
  2. $episode_id – integer The post ID of the podcast episode.

Code reference: includes/class-ssp-frontend.php

wp_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:

  1. $player – string The full HTML of the audio player.
  2. $src – string The full URL to the audio file.

Code reference: includes/class-ssp-frontend.php

wp_episode_from_file

Location: This filter is run when fetching the podcast episode from the audio file URL.

Arguments:

  1. $episode – object The post object of the podcast episode.
  2. $file – string The full URL of the audio file.

Code reference: includes/class-ssp-frontend.php

wp_feed_url

Location: This filter is run when determining the podcast feed URL to display in the podcast RSS meta tag.

Arguments:

  1. $feed_url – string The URL of the podcast feed.

Code reference: includes/class-ssp-frontend.php

wp_rss_meta_tag

Location: This filter is run on the HTML generated for the podcast RSS meta tag.

Arguments:

  1. $html – string The full HTML for the podcast RSS meta tag.

Code reference: includes/class-ssp-frontend.php

wp_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:

  1. $show – boolean Indicates whether the generator meta tag should be shown or not.
  2. $typestring Indicates the type of page being loaded (either html or xhtml).

Code reference: includes/class-ssp-frontend.php

wp_widget_recent_episodes_args

Location: This filter is run on arguments used to determine which episodes show up in the Recent Episodes widget.

Arguments:

  1. $args – array The full array of query arguments.

Code reference: includes/widgets/class-ssp-widget-recent-episodes.php

wp_widget_series_episodes_args

Location: This filter is run on arguments used to determine which episodes show up in the Series widget.

Arguments:

  1. $args – array The full array of query arguments.

Code reference: includes/widgets/class-ssp-widget-series.php