Use correct variable in wp_ajax_save_attachment(). see #21390.



git-svn-id: http://core.svn.wordpress.org/trunk@22834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Include the link URL when inserting non-image attachments. props koopersmith. fixes #22544.



git-svn-id: http://core.svn.wordpress.org/trunk@22835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Watch more events for input changes to catch paste, autocomplete, etc.

Fixes issue where pasting a URL in 'From URL' (via the context menu) did not
enable the insert button, as the event was not yet fired.

props koopersmith.
fixes #22545.



git-svn-id: http://core.svn.wordpress.org/trunk@22836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Remove vestige CSS that prevents thumbnails from always showing on media-new.php. props duck_. fixes #22547.



git-svn-id: http://core.svn.wordpress.org/trunk@22837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Only pass the current screen to the list table constructor when we have a screen to work with. This is not the case for admin-ajax requests. fixes #22570.



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

git-svn-id: http://core.svn.wordpress.org/trunk@22839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Make is_upload_space_available() available for front end page loads. Fixes fatal error when calling wp_editor() from the front end.

Props scribu, itworx
fixes #22585


git-svn-id: http://core.svn.wordpress.org/trunk@22840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Always render the attachment compat view. Assures attachment_fields_to_edit is always fired.

Props koopersmith, Chouby
fixes #22578


git-svn-id: http://core.svn.wordpress.org/trunk@22841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Correctly access the nonce to save attachment fields. Fixes firing attachment_fields_to_save.

Props koopersmith
fixes #22577


git-svn-id: http://core.svn.wordpress.org/trunk@22842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: When inserting an attachment, if the item is unattached (no post_parent), attach it to the post. fixes #22085.



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

git-svn-id: http://core.svn.wordpress.org/trunk@22844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Don't use wp_send_json_* handlers in the upload-attachment XHR handler.

The difference is the content type: application/json (which jQuery deserializes automatically for us) and the default text/html.

jQuery correctly handles application/json requests for IE, so we can continue to use the wp_send_json_* handlers elsewhere. Plupload rolls its own requests and does not handle application/json correctly. So, keep the standard text/html content type on upload-attachment.

props koopersmith.
see #22446.



git-svn-id: http://core.svn.wordpress.org/trunk@22845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In media_buttons(), consult global post_ID if get_post() comes up with nothing.
Default postID to 0 in wp_enqueue_media().

Props nacin
fixes #22085


git-svn-id: http://core.svn.wordpress.org/trunk@22846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In wp.media.editor:send, revert back to the old field names used by media_upload_form_handler() for easier back compat.
Fix notices in wp_ajax_send_attachment_to_editor().

Props nacin, azaozz, miqrogroove
fixes #22553


git-svn-id: http://core.svn.wordpress.org/trunk@22847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Back compat for media_buttons_context, which is not the correct filter for adding new media buttons. If you want to add additional media buttons, use the media_buttons action instead. fixes #22559.



git-svn-id: http://core.svn.wordpress.org/trunk@22848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
More feature detection in WP_Image_Editor_Imagick::test().
Check existence of setIteratorIndex().

Props DH-Shredder, markoheijnen
see #22543



git-svn-id: http://core.svn.wordpress.org/trunk@22849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Make wp_prepare_attachment_for_js() compatible with plugins that disable all intermediate image sizes (so no images are created on upload), and then create them on the fly using the image_downsize filter (say, with a URL that can dynamically create images on the fly).

Props nacin
fixes #22598


git-svn-id: http://core.svn.wordpress.org/trunk@22850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Rename 'id' to 'state' in menu item view.

Props koopersmith
fixes #22594


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

git-svn-id: http://core.svn.wordpress.org/trunk@22852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In media_upload_flash_bypass(), pass the post id in the media-new.php url.
In media-new.php, use post_id from REQUEST if passed and the current user can edit the post.
Fixes adding media with the browser uploader.

Props nacin, ocean90
fixes #22572


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