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.

see #22817.


git-svn-id: http://core.svn.wordpress.org/trunk@23259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Check that a router region exists before attempting to access its child views. Add relevant documentation. see #22930.


git-svn-id: http://core.svn.wordpress.org/trunk@23260 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.

see #22841.


git-svn-id: http://core.svn.wordpress.org/trunk@23261 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.

see #22841, for trunk.



git-svn-id: http://core.svn.wordpress.org/trunk@23262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Properly reset the "add to gallery" library to ensure it accurately reflects the current gallery. see #22815.


git-svn-id: http://core.svn.wordpress.org/trunk@23263 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.
see #23102.
for trunk.



git-svn-id: http://core.svn.wordpress.org/trunk@23264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Tighten our braces. Fixes #23118 props evansolomon.


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