WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/16/2016 05:17:32 PM (4 years ago)
Author:
swissspidy
Message:

Embeds: Enforce a valid post ID when embedding a post from the current site.

Otherwise wp_filter_pre_oembed_result() could erroneously return the HTML of the current post instead of the intended result.

Props kraftbj.
See #36767.

File:
1 edited

Legend:

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

    r37708 r37729  
    11011101    $post_id = apply_filters( 'oembed_request_post_id', $post_id, $url );
    11021102
     1103    if ( ! $post_id ) {
     1104        return $result;
     1105    }
     1106
    11031107    $width = isset( $args['width'] ) ? $args['width'] : 0;
    11041108
Note: See TracChangeset for help on using the changeset viewer.