diff --git a/wp-includes/embed.php b/wp-includes/embed.php index 604c76a431..2eee145b66 100644 --- a/wp-includes/embed.php +++ b/wp-includes/embed.php @@ -510,7 +510,8 @@ JS; * * @param WP_Post|int $post Post object or ID. * @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 + * or is not publicly viewable. */ function get_oembed_response_data( $post, $width ) { $post = get_post( $post ); @@ -520,7 +521,7 @@ function get_oembed_response_data( $post, $width ) { return false; } - if ( 'publish' !== get_post_status( $post ) ) { + if ( ! is_post_publicly_viewable( $post ) ) { return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index ae76de5a10..700587f389 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-beta3-50400'; +$wp_version = '5.7-beta3-50401'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.