Title: wp_audio_shortcode_override
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( ‘wp_audio_shortcode_override’, string $html, array $attr, string $content, int $instance )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/wp_audio_shortcode_override/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_audio_shortcode_override/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_audio_shortcode_override/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_audio_shortcode_override/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_audio_shortcode_override/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_audio_shortcode_override/?output_format=md#wp--skip-link--target)

Filters the default audio shortcode output.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/wp_audio_shortcode_override/?output_format=md#description)󠁿

If the filtered output isn’t empty, it will be used instead of generating the default
audio template.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_audio_shortcode_override/?output_format=md#parameters)󠁿

 `$html`string

Empty variable to be replaced with shortcode markup.

`$attr`array

Attributes of the shortcode. See [wp_audio_shortcode()](https://developer.wordpress.org/reference/functions/wp_audio_shortcode/).

`$content`string

Shortcode content.

`$instance`int

Unique numeric ID of this audio shortcode instance.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_audio_shortcode_override/?output_format=md#source)󠁿

    ```php
    $override = apply_filters( 'wp_audio_shortcode_override', '', $attr, $content, $instance );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/media.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/media.php#L3412)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/media.php#L3412-L3412)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_audio_shortcode_override/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_audio_shortcode()](https://developer.wordpress.org/reference/functions/wp_audio_shortcode/)`wp-includes/media.php` |

Builds the Audio shortcode output.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_audio_shortcode_override/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.6.0](https://developer.wordpress.org/reference/since/3.6.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_audio_shortcode_override%2F)
before being able to contribute a note or feedback.