wp_mediaelement_fallback

Provides a No-JS Flash fallback as a last resort for audio / video.

Description

(string) wp_mediaelement_fallback( (string) $url ); 

Returns (string)

Fallback HTML.

Parameters (1)

0. $url (string)
The media element URL.

Usage

  1. if ( !function_exists( 'wp_mediaelement_fallback' ) ) { 
  2. require_once ABSPATH . WPINC . '/media.php'; 
  3.  
  4. // The media element URL. 
  5. $url = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_mediaelement_fallback($url); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/media.php  
  1. function wp_mediaelement_fallback( $url ) { 
  2. /** 
  3. * Filters the Mediaelement fallback output for no-JS. 
  4. * @since 3.6.0 
  5. * @param string $output Fallback output for no-JS. 
  6. * @param string $url Media file URL. 
  7. */ 
  8. return apply_filters( 'wp_mediaelement_fallback', sprintf( '<a href="%1$s">%1$s</a>', esc_url( $url ) ), $url );