Remove trailing slashes from UPLOADS before trying a str_replace() in wp_upload_dir(). props jbrinley. fixes #22469

* In 3.4.x, both $url and UPLOADS had trailing slashes
* Due to refactoring, $url is no longer expected to have a trailing slash
* Because of the mismatch, the str_replace() was not working, resulting in an incorrectly verbose upload dir URL

git-svn-id: http://core.svn.wordpress.org/trunk@22736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Prevent type and search attachments filters from short circuiting.

Moves the reference to the source collection out of the props model. If it was translated over to a query (which was potentially possible) which then fired an ajax request, jQuery would attempt to serialize an object recursively, which caused an infinite loop and much sadness for my browser.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Dropping images on the edit gallery view will automatically add those images to the gallery. fixes #22521, see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Ensure icons stay within the bounds of their surrounding view. fixes #22522, see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Compress scripts/styles: 3.5-beta3-22740.

git-svn-id: http://core.svn.wordpress.org/trunk@22740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Remove debug cruft. props ocean90. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use a variable that is set a few lines up. $post_id is set only in post.php, not post-new.php. fixes #21092.



git-svn-id: http://core.svn.wordpress.org/trunk@22742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Dynamically generate attachment filters using get_post_mime_types().

Moves `get_post_mime_types()` from `wp-admin/includes/post.php` to `wp-includes/post.php`.

fixes #22514, see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Compress scripts/styles: 3.5-beta3-22744.

git-svn-id: http://core.svn.wordpress.org/trunk@22744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Add filters for image-only libraries. see #22514, #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Make mirroring a collection of attachments a special case of observing a collection of attachments. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Stop inserting title attributes for images inserted into the editor by modifying get_image_send_to_editor(), not the generic get_image_tag().

see #18984, [22409].



git-svn-id: http://core.svn.wordpress.org/trunk@22747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Non-images don't have alternative text. props helenyhou. see #21391.



git-svn-id: http://core.svn.wordpress.org/trunk@22748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Properly refresh the thumbnail on post.php after an image edit. props ocean90. see #21391.



git-svn-id: http://core.svn.wordpress.org/trunk@22749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Remove redundant code.

Make the composite gallery library use `mirror` instead of `observe`, as one method now invokes the other. Also, make `mirror` return the attachment collection for chaining.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Split media-new.php and media-upload.php into distinct files.
 * media-new.php will remain the entry point for uploading isolated files, and for using the browser-based uploader (versus Plupload).
 * media-upload.php is the legacy (pre-3.5) media uploader.
see #22083.



git-svn-id: http://core.svn.wordpress.org/trunk@22751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Remove cruft from media-new.php. No need to keep extra parameters around (including post ID, which is always 0 here). see #22083.



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