AiO Podcast Studio provides a set of WordPress action hooks and filter hooks that allow developers to extend or modify the plugin’s behaviour without editing plugin files. All hook callbacks should be registered in your child theme’s functions.php file or in a custom plugin using the standard add_action() and add_filter() functions.
Contents
- Action Hooks
- Template Filters
- Query Filters
- RSS Feed Filters
- Player and Display Filters
- Access Control Filters
- URL Filters
- Admin Extension Filters
Action Hooks
Action hooks fire at specific points in the plugin’s execution. Use add_action() to attach a callback to any of them.
- aiopod_podcast_submitbox_misc_actions — Fires inside the Publish meta box on the podcast edit screen. Use it to output extra fields or notices alongside the publish controls. Receives the current
WP_Postobject as its only parameter. - aiopod_podcast_details_accordions — Fires inside the Podcast Info meta box after the built-in accordion panels. Use it to append custom accordion sections to the podcast details area. Receives the current
WP_Postobject and an array of existing post meta values. - aiopod_episode_submitbox_misc_actions — Fires inside the Publish meta box on the episode edit screen. Receives the current
WP_Postobject as its only parameter. - aiopod_episode_details_accordions — Fires inside the Episode Info meta box after the built-in accordion panels. Use it to append custom accordion sections to the episode details area. Receives the current
WP_Postobject and an array of existing post meta values. - aiopod_search_form_fields — Fires at the end of every search and filter form (vertical, horizontal, and compact layouts). Use it to add hidden fields or visible inputs to any filter form. Receives the current shortcode
$attributesarray as its only parameter.
Template Filters
- aiopod_load_template — Parameters: $template (string), $attributes (array) — Fires before every template file is loaded. Return a different server path to replace a template with your own version stored in a child theme. This is the primary mechanism for template overrides. See the Child Themes and Templates tutorial for a complete guide and the full list of overridable template files.
Query Filters
These filters modify the WP_Query or WP_Term_Query arguments the plugin uses to retrieve posts or taxonomy terms before the query runs.
- aiopod_query_args — Parameters: $args (array), $attributes (array) — Filters the
WP_Queryarguments used by every episode and podcast shortcode, block, and widget. Use the$attributesarray to identify which shortcode is being rendered and apply changes selectively. This is the primary filter for adjusting what content appears in listings. - aiopod_single_podcast_episodes_args — Parameters: $args (array) — Filters the query for full episodes on a single podcast page.
- aiopod_single_podcast_trailers_args — Parameters: $args (array) — Filters the query for trailer episodes on a single podcast page.
- aiopod_single_podcast_bonus_episodes_args — Parameters: $args (array) — Filters the query for bonus episodes on a single podcast page.
- aiopod_single_episode_related_episodes_args — Parameters: $args (array) — Filters the related episodes query at the bottom of a single episode page.
- aiopod_single_category_podcasts_args — Parameters: $args (array) — Filters the podcast query on a single category archive page.
- aiopod_single_category_subcategories_args — Parameters: $args (array) — Filters the subcategory term query on a single category archive page.
- aiopod_single_tag_episodes_args — Parameters: $args (array) — Filters the episode query on a single episode tag archive page.
- aiopod_single_participant_podcasts_args — Parameters: $args (array) — Filters the podcast query on a single participant page.
- aiopod_single_participant_episodes_args — Parameters: $args (array) — Filters the episode query on a single participant page.
RSS Feed Filters
- aiopod_feed_episodes_limit — Parameters: $limit (int, default 300) — Controls the maximum number of episodes included in a podcast RSS feed. Return a lower integer to reduce feed size or a higher one to include more episodes.
- aiopod_feed_transient_enabled — Parameters: $enabled (bool, default true), $podcast_id (int) — Controls whether the RSS feed output is cached. Return
falseto disable caching for all feeds or for a specific podcast by checking$podcast_id. - aiopod_feed_allowed_mime_types — Parameters: $types (array) — Filters the list of MIME types permitted as RSS enclosures. The defaults are
audio/mpeg,audio/mp4,video/mp4,video/x-m4v, andvideo/quicktime. Add or remove types to control which file formats appear in the feed. - aiopod_rss_tracking_enabled — Parameters: $enabled (bool, default true), $episode (WP_Post) — Controls whether the plugin rewrites the episode file URL in the RSS feed to route through the download tracking endpoint. Return
falseto output the direct file URL, bypassing tracking for all or specific episodes.
Player and Display Filters
- aiopod_the_player — Parameters: $html (string), $post (WP_Post), $attributes (array) — Filters the complete HTML output of the episode player before it is rendered on the page. Use it to wrap the player in additional markup, append content below it, or replace it entirely for specific episodes.
- aiopod_the_image — Parameters: $html (string), $args (array) — Filters the HTML of every featured image rendered by the plugin, including podcast artwork and episode artwork. Use it to add attributes, wrap the image, or substitute an alternative element.
- aiopod_breadcrumb_links — Parameters: $crumbs (array), $term (WP_Term|null), $taxonomy (string), $page_id (int) — Filters the array of breadcrumb links on archive and single pages. Each item has
labelandurlkeys. Add, remove, or reorder items as needed. - aiopod_breadcrumb_separator — Parameters: $separator (string, default ‘ » ‘) — Filters the character or HTML string used to separate breadcrumb items.
- aiopod_scroll_offset — Parameters: $offset (int) — Filters the pixel offset applied when the page scrolls to an anchor after AJAX pagination loads. Increase the value if a sticky header obscures the top of the content area after scrolling.
Access Control Filters
- aiopod_current_user_can — Parameters: $result (bool), $capability (string), $post_id (int) — Filters the result of the plugin’s internal permission check. Return
falseto deny access ortrueto grant it, overriding the default role-based logic. When checking front-end viewing access,$capabilityisview_aiopod_podcast. - aiopod_podcast_access_denied_message — Parameters: $message (string), $post_id (int) — Filters the HTML message shown to visitors who try to view a restricted podcast without access. Use it to customize the message per podcast or add a login link.
- aiopod_episode_access_denied_message — Parameters: $message (string), $post_id (int) — Filters the HTML message shown to visitors who try to view a restricted episode without access.
- aiopod_podcast_access_denied_label — Parameters: $label (string), $post_id (int) — Filters the label shown next to a restricted podcast’s title in listing views. Return a non-empty string to display a label or an empty string to hide it.
- aiopod_episode_access_denied_label — Parameters: $label (string), $post_id (int) — Filters the label shown next to a restricted episode’s title in listing views.
URL Filters
- aiopod_episode_file_url — Parameters: $url (string), $post (WP_Post) — Filters the episode file URL used by the player and download links. Use it to rewrite the URL to a CDN, a proxy server, or a custom streaming endpoint.
- aiopod_rss_feed_url — Parameters: $url (string), $post (WP_Post) — Filters the RSS feed URL for a podcast. Use it to replace the default URL with a custom feed address or a third-party analytics redirect such as Podtrac or Chartable.
- aiopod_category_page_url — Parameters: $url (string), $term (WP_Term) — Filters the URL used for podcast category links throughout the plugin’s front-end output.
- aiopod_tag_page_url — Parameters: $url (string), $term (WP_Term) — Filters the URL used for episode tag links throughout the plugin’s front-end output.
- aiopod_participant_page_url — Parameters: $url (string), $term (WP_Term) — Filters the URL used for participant profile links throughout the plugin’s front-end output.
Admin Extension Filters
These filters allow you to extend the plugin’s settings pages by registering additional tabs, sections, and fields alongside the built-in ones. All three filters work together: a tab registered via aiopod_settings_tabs hosts sections registered via aiopod_settings_sections, which in turn contain fields registered via aiopod_settings_fields. Saved values are stored in the aiopod_settings WordPress option and can be retrieved with get_option( 'aiopod_settings' ).
- aiopod_settings_tabs — Parameters: $tabs (array) — Filters the array of tabs displayed on the Podcasts → Settings page. Each tab is an associative array with
idandlabelkeys. Add a new item to register a custom settings tab. - aiopod_settings_sections — Parameters: $sections (array) — Filters the array of sections within the settings page. Each section references its parent tab via a
tabkey. Add a new item to register a custom section under an existing or custom tab. - aiopod_settings_fields — Parameters: $fields (array) — Filters the array of all settings fields. Each field specifies its parent section, field type, label, and default value. Add a new item to register a custom field whose value is then available via
get_option( 'aiopod_settings' ).