Posts, Post Types: Avoid a PHP warning when `the_content()` is called outside of the loop.
Fixes #47824. Built from https://develop.svn.wordpress.org/trunk@46079 git-svn-id: http://core.svn.wordpress.org/trunk@45891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2d6a772400
commit
7828fe7e6a
|
@ -282,7 +282,7 @@ function get_the_content( $more_link_text = null, $strip_teaser = false, $post =
|
|||
return '';
|
||||
}
|
||||
|
||||
if ( null === $post ) {
|
||||
if ( null === $post && in_the_loop() ) {
|
||||
$elements = compact( 'page', 'more', 'preview', 'pages', 'multipage' );
|
||||
} else {
|
||||
$elements = generate_postdata( $_post );
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-alpha-46078';
|
||||
$wp_version = '5.3-alpha-46079';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue