Make WordPress Core


Ignore:
Timestamp:
06/16/2016 05:29:51 PM (8 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.

Merge of [37729] to the 4.5 branch.

Props kraftbj.
See #36767.

Location:
branches/4.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.5

  • branches/4.5/src/wp-includes/embed.php

    r37709 r37732  
    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.