Make WordPress Core

Changeset 27519


Ignore:
Timestamp:
03/13/2014 03:41:53 AM (11 years ago)
Author:
wonderboymusic
Message:

Account for preload="metadata" in audio and video shortcodes when multiple versions of the same <source> appear on the page by appending a query arg to "cache-bust" passed sources. The query arg is used to make the sources "unique." They will still be cached by the browser and won't bust the cache on every request.

Fixes #26779.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r27512 r27519  
    14701470                $fileurl = $$fallback;
    14711471            $type = wp_check_filetype( $$fallback, wp_get_mime_types() );
    1472             $html .= sprintf( $source, $type['type'], esc_url( $$fallback ) );
     1472            $url = add_query_arg( '_', $instances, $$fallback );
     1473            $html .= sprintf( $source, $type['type'], esc_url( $url ) );
    14731474        }
    14741475    }
     
    16581659                $type = wp_check_filetype( $$fallback, wp_get_mime_types() );
    16591660            }
    1660             $html .= sprintf( $source, $type['type'], esc_url( $$fallback ) );
     1661            $url = add_query_arg( '_', $instances, $$fallback );
     1662            $html .= sprintf( $source, $type['type'], esc_url( $url ) );
    16611663        }
    16621664    }
Note: See TracChangeset for help on using the changeset viewer.