WordPress.org

Make WordPress Core

Changeset 38321


Ignore:
Timestamp:
08/23/16 00:04:46 (15 months ago)
Author:
SergeyBiryukov
Message:

Embeds: In get_oembed_endpoint_url(), avoid inadvertent stomping of the $format parameter passed to oembed_endpoint_url filter.

Props danhgilmore.
Fixes #37751.

File:
1 edited

Legend:

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

    r37744 r38321  
    381381    $url = rest_url( 'oembed/1.0/embed' ); 
    382382 
    383     if ( 'json' === $format ) { 
    384         $format = false; 
    385     } 
    386  
    387383    if ( '' !== $permalink ) { 
    388384        $url = add_query_arg( array( 
    389385            'url'    => urlencode( $permalink ), 
    390             'format' => $format, 
     386            'format' => ( 'json' !== $format ) ? $format : false, 
    391387        ), $url ); 
    392388    } 
Note: See TracChangeset for help on using the changeset viewer.