Fix admin menu open/close issues on some mobile devices, props adamsilverstein, fixes #27980.
Built from https://develop.svn.wordpress.org/trunk@29247


git-svn-id: http://core.svn.wordpress.org/trunk@29031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In `get_adjacent_post()`, make `$excluded_terms` work as expected.

Adds unit tests.
Props jessepollak, kovshenin.
Fixes #22112.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Call `untrailingslashit()` when adding a theme directory in `register_theme_directory()`. This prevents double-slashing in generated URLs. Don't add a directory if it is already present.

Adds unit tests.
Props obenland, wonderboymusic.
Fixes #28662.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
After [29200], switch back to using `static` vars instead of adding 2 `global`s, as per Sergey.

Fixes #28697.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`wp_script_is( ..., 'enqueued' )` needs to check dependencies recursively - a single item's dependencies may only be a subset of the full dependency tree. Adds a new method on `WP_Dependencies` called `->recurse_deps()`. 

Adds unit test.

Props wonderboymusic, SergeyBiryukov, mikejolley.
Fixes #28404.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`WP_Dependencies->recurse_deps()`: tuck the recursion into `elseif` so the `foreach` doesn't break on the first item.

See [29252].

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


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