WordPress/wp-includes
Sergey Biryukov e0d440f77f Posts, Post Types: Avoid a PHP warning when get_the_content() is called outside of the loop.
This ensures that `$pages` and other globals are only used after they have been set up in `setup_postdata()`.

Follow-up to [44941].

Props tessawatkinsllc, dontdream, spacedmonkey, squarecandy, davidbaumwald, SergeyBiryukov.
Fixes #47824. See #42814.
Built from https://develop.svn.wordpress.org/trunk@48114


git-svn-id: http://core.svn.wordpress.org/trunk@47883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-21 10:36:07 +00:00
..
assets External Libraries: Update clipboard.js to 2.0.6. 2020-06-03 11:12:33 +00:00
blocks Block Editor: Update _all_ of the block editor packages following the 5.4.1 release. 2020-05-05 23:56:33 +00:00
certificates HTTP: Update the Root Certificate bundle. 2019-09-12 12:04:59 +00:00
css
customize Coding Standards: Replace echo sprintf() with printf(). 2020-06-20 13:18:11 +00:00
fonts
ID3 General: Continuing to work towards a passing PHP Compatibility scan. 2020-06-03 17:40:12 +00:00
images Customize: Move the WordPress logo with a white background to the wp-includes directory. 2020-05-21 09:10:12 +00:00
IXR General: Remove or add inline comments to $HTTP_RAW_POST_DATA occurrences. 2020-06-08 19:55:10 +00:00
js Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
PHPMailer General: Continuing to work towards a passing PHP Compatibility scan. 2020-06-15 14:56:07 +00:00
pomo Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
random_compat
Requests
rest-api REST API: Add "Link" to the list of exposed cors headers. 2020-06-20 23:56:12 +00:00
SimplePie
sitemaps Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
sodium_compat
Text General: Continuing to work towards a passing PHP Compatibility scan. 2020-06-15 14:56:07 +00:00
theme-compat Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
widgets Coding Standards: Replace echo sprintf() with printf(). 2020-06-20 13:18:11 +00:00
admin-bar.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
atomlib.php
author-template.php Docs: Consistently include an empty line between @since tag and @see, @link, or @global, per the documentation standards. 2020-06-16 21:07:14 +00:00
blocks.php Docs: Remove an empty line between @param and @return tags, per the documentation standards. 2020-06-20 11:18:09 +00:00
bookmark-template.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
bookmark.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
cache-compat.php Docs: Add missing documentation for the $group parameter of WP_Object_Cache::get_multiple(). 2020-06-10 09:57:09 +00:00
cache.php Docs: Add missing documentation for the $group parameter of WP_Object_Cache::get_multiple(). 2020-06-10 09:57:09 +00:00
canonical.php Sitemaps: Add XML sitemaps functionality to WordPress. 2020-06-17 15:24:07 +00:00
capabilities.php General: Continuing to work towards a passing PHP Compatibility scan. 2020-06-03 17:40:12 +00:00
category-template.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
category.php Docs: Remove unnecessary variables names from @return tags. 2020-06-19 22:55:12 +00:00
class-feed.php
class-http.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
class-IXR.php
class-json.php
class-oembed.php
class-phpass.php
class-phpmailer.php External Libraries: Add class aliases for phpmailerException and SMTP to deprecated files to account for the new namespace. 2020-06-12 21:42:09 +00:00
class-pop3.php
class-requests.php General: Continuing to work towards a passing PHP Compatibility scan. 2020-06-03 17:40:12 +00:00
class-simplepie.php General: Continuing to work towards a passing PHP Compatibility scan. 2020-06-03 17:40:12 +00:00
class-smtp.php External Libraries: Add class aliases for phpmailerException and SMTP to deprecated files to account for the new namespace. 2020-06-12 21:42:09 +00:00
class-snoopy.php
class-walker-category-dropdown.php
class-walker-category.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
class-walker-comment.php Comments: Rename Walker_Comment::comment_text() to ::filter_comment_text() for clarity. 2020-06-02 21:45:10 +00:00
class-walker-nav-menu.php
class-walker-page-dropdown.php
class-walker-page.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
class-wp-admin-bar.php
class-wp-ajax-response.php Docs: Consistently include an empty line between @since tag and @see, @link, or @global, per the documentation standards. 2020-06-16 21:07:14 +00:00
class-wp-block-parser.php
class-wp-block-styles-registry.php
class-wp-block-type-registry.php
class-wp-block-type.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
class-wp-comment-query.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
class-wp-comment.php
class-wp-customize-control.php
class-wp-customize-manager.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
class-wp-customize-nav-menus.php Docs: Remove unnecessary variables names from @return tags. 2020-06-19 22:55:12 +00:00
class-wp-customize-panel.php Coding Standards: Replace echo sprintf() with printf(). 2020-06-20 13:18:11 +00:00
class-wp-customize-section.php
class-wp-customize-setting.php Docs: Consistently include an empty line between @since tag and @see, @link, or @global, per the documentation standards. 2020-06-16 21:07:14 +00:00
class-wp-customize-widgets.php Coding Standards: Replace echo sprintf() with printf(). 2020-06-20 13:18:11 +00:00
class-wp-date-query.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
class-wp-dependency.php
class-wp-editor.php Docs: Remove unused @global declarations from _WP_Editors::print_tinymce_scripts(). 2020-05-27 19:48:11 +00:00
class-wp-embed.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
class-wp-error.php
class-wp-fatal-error-handler.php Upgrade/Install: Rename wp_in_maintenance_mode() to wp_is_maintenance_mode(), for consistency with wp_is_recovery_mode(). 2020-05-31 19:54:24 +00:00
class-wp-feed-cache-transient.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-feed-cache.php
class-wp-hook.php
class-wp-http-cookie.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
class-wp-http-curl.php
class-wp-http-encoding.php Docs: Consistently include an empty line between @since tag and @see, @link, or @global, per the documentation standards. 2020-06-16 21:07:14 +00:00
class-wp-http-ixr-client.php
class-wp-http-proxy.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
class-wp-http-requests-hooks.php
class-wp-http-requests-response.php
class-wp-http-response.php
class-wp-http-streams.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
class-wp-image-editor-gd.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
class-wp-image-editor-imagick.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
class-wp-image-editor.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
class-wp-list-util.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
class-wp-locale-switcher.php
class-wp-locale.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
class-wp-matchesmapregex.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
class-wp-meta-query.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
class-wp-metadata-lazyloader.php
class-wp-network-query.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
class-wp-network.php
class-wp-object-cache.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
class-wp-oembed-controller.php
class-wp-oembed.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
class-wp-paused-extensions-storage.php Docs: Remove an empty line between @param and @return tags, per the documentation standards. 2020-06-20 11:18:09 +00:00
class-wp-post-type.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
class-wp-post.php
class-wp-query.php Posts, Post Types: Avoid a PHP warning when get_the_content() is called outside of the loop. 2020-06-21 10:36:07 +00:00
class-wp-recovery-mode-cookie-service.php
class-wp-recovery-mode-email-service.php Docs: Remove an empty line between @param and @return tags, per the documentation standards. 2020-06-20 11:18:09 +00:00
class-wp-recovery-mode-key-service.php Docs: Remove unnecessary variables names from @return tags. 2020-06-19 22:55:12 +00:00
class-wp-recovery-mode-link-service.php
class-wp-recovery-mode.php Docs: Remove an empty line between @param and @return tags, per the documentation standards. 2020-06-20 11:18:09 +00:00
class-wp-rewrite.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
class-wp-role.php
class-wp-roles.php
class-wp-session-tokens.php
class-wp-simplepie-file.php
class-wp-simplepie-sanitize-kses.php
class-wp-site-query.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
class-wp-site.php
class-wp-tax-query.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
class-wp-taxonomy.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
class-wp-term-query.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
class-wp-term.php
class-wp-text-diff-renderer-inline.php
class-wp-text-diff-renderer-table.php
class-wp-theme.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
class-wp-user-meta-session-tokens.php
class-wp-user-query.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
class-wp-user-request.php
class-wp-user.php Coding Standards: Use strict comparison for count() calls. 2020-05-23 11:38:08 +00:00
class-wp-walker.php
class-wp-widget-factory.php
class-wp-widget.php Docs: Fix typo in WP_Widget::__construct() and ::WP_Widget() DocBlocks. 2020-06-09 15:37:10 +00:00
class-wp-xmlrpc-server.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
class-wp.php Comments: Ensure that unmoderated comments won't be search indexed. 2020-06-02 20:12:07 +00:00
class.wp-dependencies.php
class.wp-scripts.php
class.wp-styles.php
comment-template.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
comment.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
compat.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
cron.php General: Continuing to work towards a passing PHP Compatibility scan. 2020-06-03 17:40:12 +00:00
date.php
default-constants.php Docs: Consistently include an empty line between @since tag and @see, @link, or @global, per the documentation standards. 2020-06-16 21:07:14 +00:00
default-filters.php Sitemaps: Add XML sitemaps functionality to WordPress. 2020-06-17 15:24:07 +00:00
default-widgets.php
deprecated.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
embed-template.php
embed.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
error-protection.php Docs: Remove an empty line between @param and @return tags, per the documentation standards. 2020-06-20 11:18:09 +00:00
feed-atom-comments.php
feed-atom.php
feed-rdf.php
feed-rss2-comments.php
feed-rss2.php
feed-rss.php
feed.php Docs: Consistently include an empty line between @since tag and @see, @link, or @global, per the documentation standards. 2020-06-16 21:07:14 +00:00
formatting.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
functions.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
functions.wp-scripts.php Script Loader: Include the script or style handle in _wp_scripts_maybe_doing_it_wrong() message. 2020-06-17 10:16:08 +00:00
functions.wp-styles.php Script Loader: Include the script or style handle in _wp_scripts_maybe_doing_it_wrong() message. 2020-06-17 10:16:08 +00:00
general-template.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
http.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
kses.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
l10n.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
link-template.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
load.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
locale.php
media-template.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
media.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
meta.php Docs: Use a hyphen with the "non" prefix in a more consistent way. 2020-06-20 12:16:10 +00:00
ms-blogs.php Networks and Sites: Don't unnecessarily switch to the current blog in get_blog_details(). 2020-06-15 12:31:11 +00:00
ms-default-constants.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
ms-default-filters.php
ms-deprecated.php I18N: Remove the "Error:" prefix from error messages. 2020-06-16 15:35:13 +00:00
ms-files.php
ms-functions.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
ms-load.php Networks and Sites: Update the link text for "Debugging a WordPress Network" support article in ms_not_installed(). 2020-06-05 09:13:08 +00:00
ms-network.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
ms-settings.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
ms-site.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
nav-menu-template.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
nav-menu.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
option.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
pluggable-deprecated.php
pluggable.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
plugin.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
post-formats.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
post-template.php Posts, Post Types: Avoid a PHP warning when get_the_content() is called outside of the loop. 2020-06-21 10:36:07 +00:00
post-thumbnail-template.php
post.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
query.php Docs: Remove unnecessary variables names from @return tags. 2020-06-19 22:55:12 +00:00
registration-functions.php
registration.php
rest-api.php Docs: Remove extra spaces from @param tags. 2020-06-20 12:58:10 +00:00
revision.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
rewrite.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
rss-functions.php
rss.php General: Continuing to work towards a passing PHP Compatibility scan. 2020-06-03 17:40:12 +00:00
script-loader.php External Libraries: Update Moment.js to 2.26.0. 2020-06-17 17:40:27 +00:00
session.php
shortcodes.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
sitemaps.php Docs: Corrections and improvements to inline docs related to XML sitemaps. 2020-06-19 22:26:10 +00:00
spl-autoload-compat.php
taxonomy.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
template-loader.php Coding Standards: Fix instances of Generic.WhiteSpace.ArbitraryParenthesesSpacing.FoundEmpty. 2020-05-26 09:37:10 +00:00
template.php Coding Standards: Use strict comparison where static strings are involved. 2020-05-16 18:42:12 +00:00
theme.php Docs: Remove @staticvar tags from core. 2020-06-20 12:40:12 +00:00
update.php Docs: Consistently include an empty line between @since tag and @see, @link, or @global, per the documentation standards. 2020-06-16 21:07:14 +00:00
user.php Docs: Miscellaneous DocBlock corrections for email filters in wp-includes/user.php. 2020-06-20 12:22:07 +00:00
vars.php
version.php Posts, Post Types: Avoid a PHP warning when get_the_content() is called outside of the loop. 2020-06-21 10:36:07 +00:00
widgets.php Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way. 2020-06-20 12:02:12 +00:00
wlwmanifest.xml
wp-db.php Docs: Remove unnecessary variables names from @return tags. 2020-06-19 22:55:12 +00:00
wp-diff.php