WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp mediaelement fallback

Description

Provide a No-JS Flash fallback as a last resort for audio / video. (This function creates filter wp_mediaelement_fallback, applied by wp_audio_shortcode() and wp_video_shortcode()).

Usage

 <?php wp_mediaelement_fallback$url ?> 

Parameters

$url
(string) (required)
Default: None

Return

(string) 
Fallback HTML.

Example

This basic example:

$fallback = wp_mediaelement_fallback( '/wp-content/uploads/2013/06/my-audio-file.mp3' );
echo $fallback;

Returns this HTML:

<a href="/wp-content/uploads/2013/06/my-audio-file.mp3">/wp-content/uploads/2013/06/my-audio-file.mp3</a>

Change Log

Source File

wp_mediaelement_fallback() is located in wp-includes/media.php.

Related

Shortcode API

Audio: wp_audio_shortcode(), wp_get_audio_extensions(), get_attached_media(), wp_embed_handler_audio(), wp_mediaelement_fallback(), wp_read_audio_metadata(), wp_add_id3_tag_data()

Video: wp_video_shortcode(), wp_get_video_extensions(), get_attached_media(), wp_embed_handler_video(), wp_mediaelement_fallback(), wp_read_video_metadata(), wp_add_id3_tag_data()

See also index of Function Reference and index of Template Tags.