Commit Graph

20890 Commits

Author SHA1 Message Date
Andrew Nacin d7590ae602 Remove legacy media uploader bits from custom-header.php and custom-background.php. see #22186, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22778 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 17:44:49 +00:00
Andrew Nacin f98a3e8941 Redirect post-new.php?post_type=attachment to media-new.php. see #22491, #22083, #21391.
git-svn-id: https://develop.svn.wordpress.org/trunk@22777 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 17:40:53 +00:00
Daryl Koopersmith 11699e0567 Media: Make media views dependent on jQuery UI sortable. see #22284, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22776 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 17:28:14 +00:00
Daryl Koopersmith d477be2d12 Make jQuery a Backbone dependency. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22775 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 17:22:13 +00:00
Daryl Koopersmith fb99782dcd Media: Move send_to_editor to wp.media.editor.insert to prevent redeclaration.
Maintains backwards compatibility by delegating to window.send_to_editor and window.tb_remove if they exist.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22774 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 17:01:40 +00:00
Daryl Koopersmith 815ad62697 Media: Remove unused link-formatting function from media-editor.js. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22773 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 16:50:58 +00:00
Daryl Koopersmith 682afd8c19 Media: Remove dead thickbox code from media-editor.js. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22772 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 16:50:13 +00:00
Daryl Koopersmith 1694382d8d Media: The media views CSS depends on the button styles. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22771 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 16:47:55 +00:00
Daryl Koopersmith 8ce1f39c6c Media: Move the new sections of media-upload.js to media-editor.js to allow the media modal to be used on the front end and prevent dependency conflicts with older themes and plugins. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22770 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 16:46:32 +00:00
Peter Westwood ebb921d018 Posting: Improve the capability checking _wp_translate_postdata() when updating posts.
* Use the specific post_type's 'edit_post' cap
* Pass the ID of the post being edited.

Fixes #22417


git-svn-id: https://develop.svn.wordpress.org/trunk@22769 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 16:34:57 +00:00
Daryl Koopersmith 9a2033cabc Media: Backwards compatibility for the many send_to_editor filters. props nacin. see #22186, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22768 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 16:02:20 +00:00
Andrew Nacin 39df8515e5 Move the admin menu icons up one pixel, to restore their 3.4 positioning. props lessbloat. fixes #22527.
git-svn-id: https://develop.svn.wordpress.org/trunk@22767 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 15:37:43 +00:00
Andrew Nacin 83087fbddd Re-align the TinyMCE HiDPI icons. props lessbloat. fixes #22528.
git-svn-id: https://develop.svn.wordpress.org/trunk@22766 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 15:34:24 +00:00
Andrew Nacin 431314d357 Have the media modal direct users to media-new.php for the browser uploader. fixes #22444.
git-svn-id: https://develop.svn.wordpress.org/trunk@22765 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 15:30:48 +00:00
Andrew Nacin 0b402a8dc1 media-new.php: Remove unused scripts, strings, error handling, save handling, and save button. fixes #22083.
git-svn-id: https://develop.svn.wordpress.org/trunk@22764 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 15:10:17 +00:00
bumpbot fe20fc8ccc Compress scripts/styles: 3.5-beta3-22763.
git-svn-id: https://develop.svn.wordpress.org/trunk@22763 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 14:58:31 +00:00
Daryl Koopersmith 5432b5a3f6 Media: Calculate image width and height when embedding images. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22762 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 14:32:52 +00:00
Daryl Koopersmith 493572fd09 Media: Backwards compatibility for the disable_captions filter. see #22186, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22761 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 14:27:22 +00:00
Daryl Koopersmith 185c2d1afc Media: Use the wp.media.string functions when generating embed strings. Embed captions now work. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22760 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 14:20:01 +00:00
Andrew Nacin 893e77607d Revert accidental changes to admin/includes/media.php in [22755]. see #22083.
git-svn-id: https://develop.svn.wordpress.org/trunk@22759 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 14:04:24 +00:00
Daryl Koopersmith 4c2e0d6b45 Media: Make the attachment object optional when using the wp.media.string methods. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22758 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 13:53:15 +00:00
Andrew Nacin b59a8855db Properly nest the if tag. props helenyhou. see #21391.
git-svn-id: https://develop.svn.wordpress.org/trunk@22757 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 13:32:26 +00:00
Daryl Koopersmith 663dd97aa8 Customizer: Track the link that was used to open the customizer and restore focus on close. props lessbloat. fixes #21283.
git-svn-id: https://develop.svn.wordpress.org/trunk@22756 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 13:17:10 +00:00
Andrew Nacin 9d2cc09ce1 Have media-new.php return simple rows of basic attachment data, with an 'Edit' link next to each taking them to post.php (in a new window). Not ideal, but this is largely a fallback screen at this point.
This is bolted on to existing code, the vast majority of which is destined to be ripped out in 3.6 once things settle.

see #22083.



git-svn-id: https://develop.svn.wordpress.org/trunk@22755 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 13:05:44 +00:00
bumpbot 9360fd4fa4 Compress scripts/styles: 3.5-beta3-22754.
git-svn-id: https://develop.svn.wordpress.org/trunk@22754 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 12:58:33 +00:00
Daryl Koopersmith 6ee49f047f Media: Ensure Attachments.mirror returns true. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22753 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 12:53:02 +00:00
Andrew Nacin d2c8701c37 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: https://develop.svn.wordpress.org/trunk@22752 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 12:27:12 +00:00
Andrew Nacin 7572347b8c 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: https://develop.svn.wordpress.org/trunk@22751 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 12:19:40 +00:00
Daryl Koopersmith aa3bfdc808 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: https://develop.svn.wordpress.org/trunk@22750 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 12:11:38 +00:00
Andrew Nacin b69e4bf685 Properly refresh the thumbnail on post.php after an image edit. props ocean90. see #21391.
git-svn-id: https://develop.svn.wordpress.org/trunk@22749 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 12:05:24 +00:00
Andrew Nacin 4283deb34c Non-images don't have alternative text. props helenyhou. see #21391.
git-svn-id: https://develop.svn.wordpress.org/trunk@22748 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 12:03:35 +00:00
Andrew Nacin 59be9048dd 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: https://develop.svn.wordpress.org/trunk@22747 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 11:50:30 +00:00
Daryl Koopersmith e9670df395 Media: Make mirroring a collection of attachments a special case of observing a collection of attachments. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22746 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 11:35:30 +00:00
Daryl Koopersmith 052b765819 Media: Add filters for image-only libraries. see #22514, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22745 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 11:04:23 +00:00
bumpbot bc69308164 Compress scripts/styles: 3.5-beta3-22744.
git-svn-id: https://develop.svn.wordpress.org/trunk@22744 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 10:58:28 +00:00
Daryl Koopersmith 8e6aa60fa4 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: https://develop.svn.wordpress.org/trunk@22743 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 10:18:59 +00:00
Andrew Nacin 79435f42fa 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: https://develop.svn.wordpress.org/trunk@22742 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 09:35:23 +00:00
Daryl Koopersmith 27515780f6 Media: Remove debug cruft. props ocean90. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22741 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 09:28:58 +00:00
bumpbot ba3fbd26bd Compress scripts/styles: 3.5-beta3-22740.
git-svn-id: https://develop.svn.wordpress.org/trunk@22740 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 08:58:30 +00:00
Daryl Koopersmith 04cc69db01 Media: Ensure icons stay within the bounds of their surrounding view. fixes #22522, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22739 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 08:44:22 +00:00
Daryl Koopersmith 555141ebe4 Media: Dropping images on the edit gallery view will automatically add those images to the gallery. fixes #22521, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22738 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 08:17:45 +00:00
Daryl Koopersmith 6a9778959c 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: https://develop.svn.wordpress.org/trunk@22737 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 08:09:28 +00:00
Mark Jaquith 961a962a3c 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: https://develop.svn.wordpress.org/trunk@22736 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 07:08:38 +00:00
Andrew Nacin db7dc96921 Media: For pages, use 'Insert into page' rather than 'Insert into post'.
Custom post types can use the media_view_strings filter. No new post type "labels" for now.

see #22712. see #21092 (and #19696).



git-svn-id: https://develop.svn.wordpress.org/trunk@22735 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 23:22:03 +00:00
bumpbot 265d65f0fd Compress scripts/styles: 3.5-beta3-22734.
git-svn-id: https://develop.svn.wordpress.org/trunk@22734 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 22:58:28 +00:00
Daryl Koopersmith a0dca55d03 Media: Set a max width on select elements in the sidebar. fixes #22517, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22733 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 22:51:35 +00:00
Andrew Nacin 0857770a56 Color picker: Instant feedback when typing a color. Strengthens alt + arrows for moving around the palette. props mattwiebe. fixes #22475. fixes #22388.
git-svn-id: https://develop.svn.wordpress.org/trunk@22732 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 22:02:09 +00:00
Andrew Nacin acf2af8cb7 Customizer: Let return/enter fire click events for dropdowns and links. Remove errant focus event. Re-add box shadow and border for the overlay header. props lessbloat. see #21283.
git-svn-id: https://develop.svn.wordpress.org/trunk@22731 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 21:25:54 +00:00
Andrew Ozz b254457b19 Skip To links: visually hide by only setting top: -1000em; (this should make them work well in all screen readers), fixes #21312
git-svn-id: https://develop.svn.wordpress.org/trunk@22730 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 21:14:49 +00:00
bumpbot f633a3aeff Compress scripts/styles: 3.5-beta3-22729.
git-svn-id: https://develop.svn.wordpress.org/trunk@22729 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 20:58:28 +00:00