WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/wp mediaelement fallback

Contents

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_audio(), get_attached_media(), get_embedded_audio(), get_embedded_media(), wp_embed_handler_audio(), wp_mediaelement_fallback(), wp_read_audio_metadata(), wp_add_id3_tag_data(), the_post_format_audio(), get_the_post_format_media(), get_content_audio(), get_content_media()

Video: wp_video_shortcode(), wp_get_video_extensions(), get_attached_video(), get_attached_media(), get_embedded_video(), get_embedded_media(), wp_embed_handler_video(), wp_mediaelement_fallback(), wp_read_video_metadata(), wp_add_id3_tag_data(), the_post_format_video(), get_the_post_format_media(), get_content_video(), get_content_media()

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