This commit is contained in:
Mike Jolley 2021-02-15 16:48:30 +00:00 committed by GitHub
parent 51789e2105
commit be4d32d705
1 changed files with 1 additions and 1 deletions

View File

@ -239,7 +239,7 @@ class Assets {
if ( is_numeric( $page ) && $page > 0 ) {
$page = get_post( $page );
}
if ( ! is_a( $page, '\WP_Post' ) ) {
if ( ! is_a( $page, '\WP_Post' ) || 'publish' !== $page->post_status ) {
return [
'id' => 0,
'title' => '',