WordPress/wp-includes
Mark Jaquith edfe2ece51 Cache API: Allow external object caches to gracefully degrade to the default object cache.
Rework logic for how external object caches are detected, so that if
an external cache does not define a `wp_cache_init()`, the built-in
object cache will be used.

Object caches can now wrap their entire contents in logic checks. So a
Redis caching backend could make sure that the `Redis` PHP class is
available before defining all the caching functions. And if Redis is
not available, the site doesn't break or throw errors or think it is
using caching when it isn't. This is particularly useful for doing
local development, where you might want to develop on a site without
running Memcache or Redis like you are in production.

* Accounts for multisite, which may re-initialize the object cache
multiple times.
* Accounts for object caches that may include `object-cache.php` during
`advanced-cache.php` (before WP loads it).

Props jtsternberg, markjaquith.
Fixes #22661.


Built from https://develop.svn.wordpress.org/trunk@42723


git-svn-id: http://core.svn.wordpress.org/trunk@42553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 14:59:30 +00:00
..
ID3 Media: update the `getID3` library to version `1.9.14` to avoid fatal errors in PHP7. 2017-07-31 19:50:45 +00:00
IXR XML-RPC: Add default values to IXR_Message for PHP 7.2 compatibility to avoid PHP Warnings. 2018-02-06 02:56:32 +00:00
Requests HTTP: Update Requests to master (0048f3c) which fixes a number of outstanding issues. 2016-10-05 03:24:37 +00:00
SimplePie
Text External Libraries: Remove usage of `each()` from the `Text_Diff_Engine_native` class. 2017-10-26 12:52:53 +00:00
certificates Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs. 2016-05-13 18:41:31 +00:00
css Administration: Remove erroneous `transition-delay` values from CSS files. 2018-02-11 12:55:30 +00:00
customize Customize: Correct "Add Items" button reference in help text shown after creating a new menu. 2018-01-23 12:03:30 +00:00
fonts Dashicons: Fix incorrect ID in SVG version of font. 2016-03-18 20:43:26 +00:00
images Embeds: Load the default site icon from the `wp-includes` directory. 2016-02-23 16:55:27 +00:00
js General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
pomo Code is Poetry. 2017-11-30 23:11:00 +00:00
random_compat External Libraries: Update Random_Compat from 1.2.1 to 2.0.11. 2017-11-08 11:48:49 +00:00
rest-api Docs: Add missing code formatting to various `@since` entries. 2018-02-09 16:55:31 +00:00
theme-compat Code is Poetry. 2017-11-30 23:11:00 +00:00
widgets Docs: Correct erroneous class references in `@see` tags. 2018-02-01 01:20:30 +00:00
admin-bar.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
atomlib.php General: Remove most uses of create_function() 2016-12-13 01:49:39 +00:00
author-template.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
bookmark-template.php Code is Poetry. 2017-11-30 23:11:00 +00:00
bookmark.php Code is Poetry. 2017-11-30 23:11:00 +00:00
cache.php Code is Poetry. 2017-11-30 23:11:00 +00:00
canonical.php Code is Poetry. 2017-11-30 23:11:00 +00:00
capabilities.php Role/Capability: Make `install_languages` capability check less restrictive. 2018-01-24 22:42:30 +00:00
category-template.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
category.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-IXR.php Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389. 2016-08-31 16:31:29 +00:00
class-feed.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-http.php HTTP API: Add the URL as a paramter to various HTTP related filters. 2018-02-09 18:11:30 +00:00
class-json.php
class-oembed.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-phpass.php
class-phpmailer.php Update PHPMailer to 5.2.22. 2017-01-11 01:23:41 +00:00
class-pop3.php Docs: Fix multiple trivial typos throughout a variety of core files. 2016-10-31 06:28:32 +00:00
class-requests.php HTTP: Update Requests to master (0048f3c) which fixes a number of outstanding issues. 2016-10-05 03:24:37 +00:00
class-simplepie.php Autoload: Introduce shim for SPL autoloading. 2016-06-06 03:24:29 +00:00
class-smtp.php Update PHPMailer to 5.2.22. 2017-01-11 01:23:41 +00:00
class-snoopy.php Docs: Use 3-digit, x.x.x-style semantic versioning for `_doing_it_wrong()`, `_deprecated_function()`, `_deprecated_argument()`, and `_deprecated_file()` throughout core. 2016-07-06 12:40:29 +00:00
class-walker-category-dropdown.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-walker-category.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-walker-comment.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-walker-nav-menu.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-walker-page-dropdown.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-walker-page.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-admin-bar.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-ajax-response.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-comment-query.php Docs: Add missing `@return` entry for `WP_Comment_Query::get_comment_ids()`. 2017-12-07 13:47:52 +00:00
class-wp-comment.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-customize-control.php Customize: Avoid extra tabs in a textarea in `WP_Customize_Control::render_content()`. 2018-02-08 10:59:30 +00:00
class-wp-customize-manager.php General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
class-wp-customize-nav-menus.php Docs: Correct erroneous class references in `@see` tags. 2018-02-01 01:20:30 +00:00
class-wp-customize-panel.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-customize-section.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-customize-setting.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-customize-widgets.php Docs: Correct erroneous class references in `@see` tags. 2018-02-01 01:20:30 +00:00
class-wp-dependency.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-editor.php Docs: Correct erroneous class references in `@see` tags. 2018-02-01 01:20:30 +00:00
class-wp-embed.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-error.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-feed-cache-transient.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-feed-cache.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-hook.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-http-cookie.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-http-curl.php HTTP API: Add the URL as a paramter to various HTTP related filters. 2018-02-09 18:11:30 +00:00
class-wp-http-encoding.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-http-ixr-client.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-http-proxy.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-http-requests-hooks.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-http-requests-response.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-http-response.php HTTP API: Use `WP_HTTP_Response::set_data()` in `::__construct()` instead of directly accessing the `$data` property. 2017-10-03 15:18:46 +00:00
class-wp-http-streams.php HTTP API: Add the URL as a paramter to various HTTP related filters. 2018-02-09 18:11:30 +00:00
class-wp-image-editor-gd.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-image-editor-imagick.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-image-editor.php Media: After [42695], remove redundant check that is already performed a few lines above. 2018-02-11 21:55:30 +00:00
class-wp-list-util.php General: Allow `wp_list_pluck()` to operate on arrays of references without overwriting the referenced items. 2018-01-18 05:18:31 +00:00
class-wp-locale-switcher.php Docs: Add `@since` version for `WP_Locale_Switcher::init()`. 2017-12-15 00:32:46 +00:00
class-wp-locale.php I18N: Remove unused `$start_of_week` property from `WP_Locale`. 2018-02-18 16:32:34 +00:00
class-wp-matchesmapregex.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-meta-query.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-metadata-lazyloader.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-network-query.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-network.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-oembed-controller.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-post-type.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-post.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-query.php Query: Fix warning on counting non countable 2018-01-24 01:21:31 +00:00
class-wp-rewrite.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-role.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-roles.php Docs: Add missing code formatting to various `@since` entries. 2018-02-09 16:55:31 +00:00
class-wp-session-tokens.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-simplepie-file.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-simplepie-sanitize-kses.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-site-query.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-site.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-tax-query.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-taxonomy.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-term-query.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-term.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-text-diff-renderer-inline.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-text-diff-renderer-table.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-theme.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-user-meta-session-tokens.php Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-user-query.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-user.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-walker.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-widget-factory.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-widget.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class-wp-xmlrpc-server.php General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
class-wp.php WP: Don't attempt to convert multiple-nested arrays to a string in WP->parse_request(). 2017-12-22 03:18:47 +00:00
class.wp-dependencies.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class.wp-scripts.php Code is Poetry. 2017-11-30 23:11:00 +00:00
class.wp-styles.php Code is Poetry. 2017-11-30 23:11:00 +00:00
comment-template.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
comment.php Docs: Add missing code formatting to various `@since` entries. 2018-02-09 16:55:31 +00:00
compat.php Code is Poetry. 2017-11-30 23:11:00 +00:00
cron.php Code is Poetry. 2017-11-30 23:11:00 +00:00
date.php Code is Poetry. 2017-11-30 23:11:00 +00:00
default-constants.php Docs: Fix a copy paste error in the DocBlock summary for `wp_ssl_constants()`, see [13062]. 2018-02-09 18:21:31 +00:00
default-filters.php Formatting: Do not run formatting and texturization on author bios. 2018-01-13 01:11:49 +00:00
default-widgets.php Widgets: Introduce Gallery widget for displaying image galleries. 2017-09-25 06:28:45 +00:00
deprecated.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
embed-template.php Docs: Use 3-digit, x.x.x-style semantic versioning for `_doing_it_wrong()`, `_deprecated_function()`, `_deprecated_argument()`, and `_deprecated_file()` throughout core. 2016-07-06 12:40:29 +00:00
embed.php Code is Poetry. 2017-11-30 23:11:00 +00:00
feed-atom-comments.php Code is Poetry. 2017-11-30 23:11:00 +00:00
feed-atom.php Code is Poetry. 2017-11-30 23:11:00 +00:00
feed-rdf.php Code is Poetry. 2017-11-30 23:11:00 +00:00
feed-rss.php Code is Poetry. 2017-11-30 23:11:00 +00:00
feed-rss2-comments.php Code is Poetry. 2017-11-30 23:11:00 +00:00
feed-rss2.php Code is Poetry. 2017-11-30 23:11:00 +00:00
feed.php Docs: Remove erroneous zero-width space before URL in `fetch_feed()` DocBlock. 2017-12-21 02:40:54 +00:00
formatting.php Emoji: Tweak the generated emoji arrays to not cause coding standards errors. 2018-01-25 01:06:31 +00:00
functions.php General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
functions.wp-scripts.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
functions.wp-styles.php Code is Poetry. 2017-11-30 23:11:00 +00:00
general-template.php Comments: Avoid a PHP notice in `paginate_comments_links()` if `type` argument is set to array. 2018-02-12 21:12:35 +00:00
http.php Docs: Add missing code formatting to various `@since` entries. 2018-02-09 16:55:31 +00:00
kses.php Docs: Move inline comments in `wp_kses_split2()` before the blocks they apply to. 2018-02-14 11:46:33 +00:00
l10n.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
link-template.php Comments: Avoid a PHP notice in `paginate_comments_links()` if `type` argument is set to array. 2018-02-12 21:12:35 +00:00
load.php Cache API: Allow external object caches to gracefully degrade to the default object cache. 2018-02-21 14:59:30 +00:00
locale.php Load: No-op `locale.php` 2016-12-03 04:16:38 +00:00
media-template.php Media: avoid page scrolling when opening the media modal. 2018-01-31 17:03:33 +00:00
media.php Media: In `img_caption_shortcode()`, make sure `$id` and `$caption_id` are always defined. 2018-02-12 22:36:33 +00:00
meta.php Code is Poetry. 2017-11-30 23:11:00 +00:00
ms-blogs.php Docs: Add missing code formatting to various `@since` entries. 2018-02-09 16:55:31 +00:00
ms-default-constants.php Code is Poetry. 2017-11-30 23:11:00 +00:00
ms-default-filters.php Code is Poetry. 2017-11-30 23:11:00 +00:00
ms-deprecated.php Docs: Correct some `@since MU` notation that was broken in [41200]. 2017-10-03 17:44:48 +00:00
ms-files.php Code is Poetry. 2017-11-30 23:11:00 +00:00
ms-functions.php Docs: Add missing code formatting to various `@since` entries. 2018-02-09 16:55:31 +00:00
ms-load.php Networks and Sites: In `get_site_by_path()`, use single `domain` and `path` parameters if there's only one item to look for. 2018-02-11 17:09:31 +00:00
ms-settings.php Code is Poetry. 2017-11-30 23:11:00 +00:00
nav-menu-template.php Code is Poetry. 2017-11-30 23:11:00 +00:00
nav-menu.php Menus: Remove `$_menu_item_sort_prop` global reference from `wp_get_nav_menu_items()`, unused since [38928]. 2018-02-01 15:42:31 +00:00
option.php Options: Unhook default option filter when setting is unregistered. 2018-02-06 14:49:32 +00:00
pluggable-deprecated.php Docs: Use 3-digit, x.x.x-style semantic versioning for `_doing_it_wrong()`, `_deprecated_function()`, `_deprecated_argument()`, and `_deprecated_file()` throughout core. 2016-07-06 12:40:29 +00:00
pluggable.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
plugin.php Code is Poetry. 2017-11-30 23:11:00 +00:00
post-formats.php Code is Poetry. 2017-11-30 23:11:00 +00:00
post-template.php Docs: Add a reference to `get_pages()` arguments in `wp_dropdown_pages()` and `wp_list_pages()`, as they both use the function internally. 2018-02-19 22:24:31 +00:00
post-thumbnail-template.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
post.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
query.php Docs: Correct `$id` parameter type for `old_slug_redirect_post_id` filter. 2018-02-21 09:35:33 +00:00
registration-functions.php Code is Poetry. 2017-11-30 23:11:00 +00:00
registration.php Code is Poetry. 2017-11-30 23:11:00 +00:00
rest-api.php Code is Poetry. 2017-11-30 23:11:00 +00:00
revision.php Code is Poetry. 2017-11-30 23:11:00 +00:00
rewrite.php Code is Poetry. 2017-11-30 23:11:00 +00:00
rss-functions.php Code is Poetry. 2017-11-30 23:11:00 +00:00
rss.php Docs: Fix multiple trivial typos throughout a variety of core files. 2016-10-31 06:28:32 +00:00
script-loader.php General: Further improve error messages following [42648]. 2018-02-19 02:13:32 +00:00
session.php Code is Poetry. 2017-11-30 23:11:00 +00:00
shortcodes.php Code is Poetry. 2017-11-30 23:11:00 +00:00
spl-autoload-compat.php General: Move the `__autoload()` compat function into its own file to prevent deprecated notices being thrown by the compiler in PHP 7.2. 2017-07-28 01:15:52 +00:00
taxonomy.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
template-loader.php Code is Poetry. 2017-11-30 23:11:00 +00:00
template.php Docs: Add missing code formatting to various `@since` entries. 2018-02-09 16:55:31 +00:00
theme.php Docs: Add documentation for `header_video_settings` filter. 2018-02-12 22:39:31 +00:00
update.php Updates: Partially revert [42584], as this branch of code should always be run after a core update check. 2018-02-06 11:04:34 +00:00
user.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
vars.php Code is Poetry. 2017-11-30 23:11:00 +00:00
version.php Cache API: Allow external object caches to gracefully degrade to the default object cache. 2018-02-21 14:59:30 +00:00
widgets.php Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions. 2018-02-13 16:54:31 +00:00
wlwmanifest.xml
wp-db.php Database: If both `WP_DEBUG` and `WP_DEBUG_DISPLAY` are true, display a more specific error message in `wpdb::bail()`. 2018-02-15 14:29:30 +00:00
wp-diff.php Code is Poetry. 2017-11-30 23:11:00 +00:00