Media: Check that a router region exists before attempting to access its child views. Add relevant documentation.

Merges [23260] to the 3.5 branch.

props koopersmith.
fixes #22930.



git-svn-id: http://core.svn.wordpress.org/branches/3.5@23268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Limit the execution of wp_enqueue_media() to once per page. Prevents multiple _wpMediaViewsL10n variables.

Merges [23214] to the 3.5 branch.
fixes #22843.



git-svn-id: http://core.svn.wordpress.org/branches/3.5@23269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Automatically select uploading attachments in single-select workflows.

The code now automatically selects uploading attachments in all workflows. In a workflow that selects multiple attachments, all attachments added to the upload queue are selected. In a workflow that selects a single attachment (e.g. selecting a featured image), the last attachment added to the upload queue is selected.

Merges [23259] to the 3.5 branch.

props koopersmith.
fixes #22817.



git-svn-id: http://core.svn.wordpress.org/branches/3.5@23270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Ensure that get_archive_template() only loads a post type archive (archive-$post_type.php file) if there is exactly one post type in the query.

Merges [23249] to the 3.5 branch.

props scribu.
see #22956.



git-svn-id: http://core.svn.wordpress.org/branches/3.5@23271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Do not update attachment display user settings when a single attachment is inserted.

This is consistent with 3.4 behavior. (User settings are now only updated when the user makes an explicit change.)

Merges [23261] to the 3.5 branch.

props koopersmith.
fixes #22841.



git-svn-id: http://core.svn.wordpress.org/branches/3.5@23272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Restore 3.4 behavior by consulting the old-school DB options for default align, size, and link properties.

This restores linking to media files as the default, over attachment pages. This 'default' cannot currently be changed by a user setting (per 3.4 behavior), due to the default database schema.

Merges [23262] to the 3.5 branch.
fixes #22841.



git-svn-id: http://core.svn.wordpress.org/branches/3.5@23273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
RTL fixes for internal linking. props SergeyBiryukov, helen.

merges [23226] to the 3.5 branch.
fixes #22835.



git-svn-id: http://core.svn.wordpress.org/branches/3.5@23274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Restore TinyMCE dropdowns to their 3.4 appearance in RTL.

Merges [23275] to the 3.5 branch.
props helen.
fixes #23101.



git-svn-id: http://core.svn.wordpress.org/branches/3.5@23276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Taxonomy postbox: fix toggling with "Choose from the most used tags" when several postboxes are shown, props SergeyBiryukov, fixes #23112 for 3.5

git-svn-id: http://core.svn.wordpress.org/branches/3.5@23277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Compress scripts/styles: 3.5.1-alpha-23280.

git-svn-id: http://core.svn.wordpress.org/branches/3.5@23280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Try not to send Last-Modified, even with an empty value. Some servers interpret an empty value as the epoch.

Props nacin, slene, SergeyBiryukov, andy
fixes #23021 for 3.5


git-svn-id: http://core.svn.wordpress.org/branches/3.5@23281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Pass thumbnail and medium sizes to image_constrain_size_for_editor() to force constraints based on the current DB options for those sizes. History: see #22598, #22738.

props jond3r
fixes #23102
for 3.5


git-svn-id: http://core.svn.wordpress.org/branches/3.5@23282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Don't unnecessarily re-render the attachment details view when editing the title and caption. Re-rendering causes issues with tabbing and focus, and is only necessary for other views (such as "Caption this image..." when editing a gallery).

Merges [23283] to the 3.5 branch.

props koopersmith.
fixes #23054.



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