mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Embeds: In get_oembed_response_data()
, make the $post
argument required.
`get_oembed_response_data()` is called by the API endpoint controller and never in a context where it makes sense to use the global post object. Props swissspidy. See #34523. Built from https://develop.svn.wordpress.org/trunk@35471 git-svn-id: http://core.svn.wordpress.org/trunk@35435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
64fdde928a
commit
0b845e0364
@ -510,11 +510,11 @@ JS;
|
|||||||
*
|
*
|
||||||
* @since 4.4.0
|
* @since 4.4.0
|
||||||
*
|
*
|
||||||
* @param WP_Post|int $post Optional. Post object or ID. Default is global `$post`.
|
* @param WP_Post|int $post Post object or ID.
|
||||||
* @param int $width The requested width.
|
* @param int $width The requested width.
|
||||||
* @return array|false Response data on success, false if post doesn't exist.
|
* @return array|false Response data on success, false if post doesn't exist.
|
||||||
*/
|
*/
|
||||||
function get_oembed_response_data( $post = null, $width ) {
|
function get_oembed_response_data( $post, $width ) {
|
||||||
$post = get_post( $post );
|
$post = get_post( $post );
|
||||||
|
|
||||||
if ( ! $post ) {
|
if ( ! $post ) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-beta2-35470';
|
$wp_version = '4.4-beta2-35471';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user