Heartbeat:
- Use the page visibility API (when available) and document.hasFocus() instead of window.onfocus/onblur. Improves speeding up/slowing down the interval and works for iframes by default.
- Add a setting for minimal interval. Maximum value is 10 min. This overrides all other intervals and cannot be changed after setting it at initialization. Can be used to reduce the frequency of requests on hosts that have low limits for used CPU time, etc.
- Extend the setting of interval to support 120 sec. (60 sec, is still the default).
- Always suspend after one hour of keyboard/mouse/touch inactivity.
Fixes #29779.
Built from https://develop.svn.wordpress.org/trunk@30293


git-svn-id: http://core.svn.wordpress.org/trunk@30292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
TinyMCE: remove strings that are not translated before outputting the translations. Fixes #27797.
Built from https://develop.svn.wordpress.org/trunk@30294


git-svn-id: http://core.svn.wordpress.org/trunk@30293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix PHP notice in `Tests_Feed_RSS2::test_items()`.

A notice was being thrown when `get_the_tags()` returned false, and `foreach()`
was run over that return value.

See [30283].
Built from https://develop.svn.wordpress.org/trunk@30295


git-svn-id: http://core.svn.wordpress.org/trunk@30294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
TinyMCE: enable direct calls to `_WP_Editors::wp_mce_translation()`. When using TinyMCE directly, this makes it easier to load the translation of the default strings. Fixes #30293.
Built from https://develop.svn.wordpress.org/trunk@30296


git-svn-id: http://core.svn.wordpress.org/trunk@30295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`wpdb::flush()` was not flushing results correctly when using mysqli.

This change also allows stored procedures or queries made with `mysqli_multi_query()` to be flushed.

Includes unit tests.

Fixes #28155.

Props soulseekah.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Exclude external-http tests when running `phpunit`.

The external-http tests are very slow, and `Wp_Http` functionality is fairly
isolated, so the benefits of skipping these tests by default outweigh the
risks.

A `grunt phpunit:external-http` subtask has been added, to ensure that the
tests are executed during exhaustive runs of the test suite, such as in
continuous integration.

Fixes #30304.
Built from https://develop.svn.wordpress.org/trunk@30298


git-svn-id: http://core.svn.wordpress.org/trunk@30297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
wpdb: When flushing results on a mysqli connection, make sure that `wpdb::$dbh` is a valid mysqli connection handle.

Fixes a unit test failure introduced in [30297].

Fixes #28155.

Props soulseekah.


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


git-svn-id: http://core.svn.wordpress.org/trunk@30298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve localization for `WP_Date_Query` error strings.

* Don't create an extra variable for the string when it's only used once.
* Avoid using `<code>` HTML tags inside of translatable string.
* Improve data types and escaping on sprintfed values.

Props dd32.
Fixes #25834.
Built from https://develop.svn.wordpress.org/trunk@30300


git-svn-id: http://core.svn.wordpress.org/trunk@30299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Correct grammar error in `WP_Date_Query` error message.

Props Offereins.
See #25834.
Built from https://develop.svn.wordpress.org/trunk@30301


git-svn-id: http://core.svn.wordpress.org/trunk@30300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Fifteen: simpler CSS by using divs instead of spans for menu descriptions.

Props philiparthurmoore, fixes #30296


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


git-svn-id: http://core.svn.wordpress.org/trunk@30301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Fifteen: create consistent spacing with embeds and images.

Props afercia, fixes #30286


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


git-svn-id: http://core.svn.wordpress.org/trunk@30302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Fifteen: simplify the code used to generate screen reader text for the is_home title.

Props davidakennedy, fixes #30305


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


git-svn-id: http://core.svn.wordpress.org/trunk@30303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Fifteen: Minor formatting and docs tweaks, clearer variable name.

Props celloexpressions, see #29988


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


git-svn-id: http://core.svn.wordpress.org/trunk@30304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Customizer: When navigating around the site within the Customizer preview, update the document title.

props westonruter.
fixes #28542.
Built from https://develop.svn.wordpress.org/trunk@30306


git-svn-id: http://core.svn.wordpress.org/trunk@30305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Customizer: Use `jQuery.fn.toggle()` instead of `slideUp`/`slideDown` if panel/section/control is not inserted into DOM yet.

jQuery does nothing when calling `slideUp` on elements that are not inserted into the DOM yet, which can now be the case now when first loading the Customizer as the panels, sections and controls get dynamically inserted, see #28709.

props westonruter.
fixes #30251.
Built from https://develop.svn.wordpress.org/trunk@30307


git-svn-id: http://core.svn.wordpress.org/trunk@30306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Customizer: Trigger `widget-added` event when initializing.

Widget controls are now added to the pane dynamically via JavaScript, see #28709.
Remove the event trigger from `SidebarControl.addWidget()` as it's covered by `WidgetControl.ready()`.

props westonruter.
fixes #30236.
Built from https://develop.svn.wordpress.org/trunk@30308


git-svn-id: http://core.svn.wordpress.org/trunk@30307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Customizer: Add support for the media library in Background Image controls.

`WP_Customize_Upload_Control` (PHP) and `api.UploadControl` (JS) can now open the media modal.

props celloexpressions, and ericlewis for docs.
see #21483.
Built from https://develop.svn.wordpress.org/trunk@30309


git-svn-id: http://core.svn.wordpress.org/trunk@30308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Always use a full filesystem path when including the FTP handler in PemFTP. This prevents other files in the includes directory being scanned/included accidentally.
See #29628

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


git-svn-id: http://core.svn.wordpress.org/trunk@30309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
PHP 5.2 compatibility for [30310], __DIR__ wasn't added until PHP 5.3. Props TobiasBg. Fixes #29628

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


git-svn-id: http://core.svn.wordpress.org/trunk@30310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Fifteen: clean up sprintf from template tags and use the correct escaping for twentyfifteen template tags.

Props aprea, obenland, fixes #30319


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


git-svn-id: http://core.svn.wordpress.org/trunk@30311 1a063a9b-81f0-0310-95a4-ce76da25c4cd