Pass post ID to embed_oembed_html filter to avoid global variable incantations. props filosofo. fixes #15491
git-svn-id: https://develop.svn.wordpress.org/trunk@16740 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7d9fa8c5f7
commit
4ff9b0520b
|
@ -1190,7 +1190,7 @@ class WP_Embed {
|
||||||
return $this->maybe_make_link( $url );
|
return $this->maybe_make_link( $url );
|
||||||
|
|
||||||
if ( !empty($cache) )
|
if ( !empty($cache) )
|
||||||
return apply_filters( 'embed_oembed_html', $cache, $url, $attr );
|
return apply_filters( 'embed_oembed_html', $cache, $url, $attr, $post_ID );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use oEmbed to get the HTML
|
// Use oEmbed to get the HTML
|
||||||
|
@ -1203,7 +1203,7 @@ class WP_Embed {
|
||||||
|
|
||||||
// If there was a result, return it
|
// If there was a result, return it
|
||||||
if ( $html )
|
if ( $html )
|
||||||
return apply_filters( 'embed_oembed_html', $html, $url, $attr );
|
return apply_filters( 'embed_oembed_html', $html, $url, $attr, $post_ID );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Still unknown
|
// Still unknown
|
||||||
|
|
Loading…
Reference in New Issue