Embeds: Allow posts with a public custom post status to be embedded.
Previously, only posts with the `publish` status could be embedded. Props goaroundagain, peterwilsoncc, poena. Fixes #47574. Built from https://develop.svn.wordpress.org/trunk@50401 git-svn-id: http://core.svn.wordpress.org/trunk@50012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c55ccb3ef0
commit
a088b586ec
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue