Commit Graph

3723 Commits

Author SHA1 Message Date
Andrew Nacin 6f8d5c1401 Media Library list table: Rename 'Attached to' to 'Uploaded to'.
In 3.5, we have chosen to de-emphasize the "attaching" part of the
post-attachment relationship. Existing functionality remains the same,
but UI emphasis is now placed on "parent" being where the item was
originally uploaded.

fixes #22439.



git-svn-id: https://develop.svn.wordpress.org/trunk@22630 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-17 06:56:05 +00:00
Andrew Nacin 2fb495eba6 Prevent notices when post_id is not passed to the old media upload forms. props ldebrouwer. fixes #22465.
git-svn-id: https://develop.svn.wordpress.org/trunk@22628 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-17 06:42:14 +00:00
Ryan Boren 91d80348b8 Show the update nag in the network admin.
Props Mamaduka
fixes #20959


git-svn-id: https://develop.svn.wordpress.org/trunk@22618 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-16 21:52:48 +00:00
Andrew Nacin 46a29a06e0 wp_generate_attachment_metadata() should not call WP_Image_Editor if there's nothing to resize. props mdawaffe. fixes #22438.
git-svn-id: https://develop.svn.wordpress.org/trunk@22571 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-14 14:26:52 +00:00
Daryl Koopersmith f684d6abc2 Media: Make edit gallery button use new media. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22568 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-14 09:06:10 +00:00
Daryl Koopersmith c77d7b96db Media: Activate the featured image toolbar when the media dialog is first opened. see #21390, #21776.
git-svn-id: https://develop.svn.wordpress.org/trunk@22561 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-14 02:39:54 +00:00
Ryan Boren 55543163fe In wp_crop_image(), preserve both src_file and src. src_file must be preserved even when url fopen is used so that we don't try to save to a filename based on the url.
see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22553 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-13 00:03:55 +00:00
Daryl Koopersmith f6a737ed34 Media: Add Embed from URL tab.
Note: There is a bug that currently blocks adding several successive embeds.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22547 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-12 05:57:12 +00:00
Daryl Koopersmith 57b09463e6 Media: Add backwards compatibility for attachment_fields_to_edit and attachment_fields_to_save. see #22186.
git-svn-id: https://develop.svn.wordpress.org/trunk@22541 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-11 01:26:42 +00:00
Ryan Boren 5f92c0e7f4 Pass an attachment ID, not a file path, to _load_image_to_edit_path() from wp_crop_image(). This fixes handling of attachments that require url fopen to access the image.
Allow passing urls instead of just file paths to WP_Image_Editor_Imagick::load() and WP_Image_Editor_GD::load() so that attachments requiring URL fopen can be handled.

see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22538 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 20:42:27 +00:00
Daryl Koopersmith 62fe5ba600 Media: Add title, caption, and alt text, and attachment info to sidebar.
* Improve sidebar styles.
* Separate the hybrid title/caption field.
* Improve the sidebar image thumbnail.
* Remove filenames from inside the non-image icon thumbnail.
* Properly sync title/caption/alt.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22532 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 18:25:04 +00:00
Daryl Koopersmith 7bbd87b61d Media: Keep the selected featured image in the media modal in sync with the page. fixes #22404, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22528 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 08:40:35 +00:00
Daryl Koopersmith 847a00f84b Media: Backwards compatibility for media_upload_tabs.
* Adds `createIframeStates()` to the `MediaFrame` view. It creates states and bindings for the `media_upload_tabs` output, and is included on `MediaFrame.Post` by default.
* Hijacks `tb_remove()` when the media modal is open to ensure the modal closes correctly.
* Adds a `chromeless` parameter to thickbox media tab URLs to render the UI without the old row of tabs.

see #22186, #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22523 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 07:51:37 +00:00
Andrew Nacin ba1682a270 Don't allow non-image uploads for custom headers and backgrounds. props kovshenin. fixes #22149.
git-svn-id: https://develop.svn.wordpress.org/trunk@22521 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 05:36:37 +00:00
Ryan Boren e678b95a5a WP_Image_Editor improvements.
* Make test() and supports_mime_type() static.
* Add required_methods argument to get_instance(). Allows requesting an implementation that has certain methods/capabilities.
* Whitespace cleanup

Props markoheijnen
see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22510 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 19:38:54 +00:00
Daryl Koopersmith b56b57bc2c Media: Make "update featured image" button primary. see #21776, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22500 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 11:28:43 +00:00
Peter Westwood 2a8c640a1f Multisite: When displaying the upload quota and space used in the dashboard widget format them nicely.
git-svn-id: https://develop.svn.wordpress.org/trunk@22498 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 10:47:43 +00:00
Peter Westwood c6c233cc2c Multisite: Move all the functions which calculate upload space usage to wp-includes so they apply correctly with front-end editors.
Fixes #22357 props wonderboymusic.


git-svn-id: https://develop.svn.wordpress.org/trunk@22497 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 10:35:42 +00:00
Daryl Koopersmith fc7021dcf9 Media: Update featured images to use the media frame. fixes #21776, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22496 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 10:13:39 +00:00
Daryl Koopersmith 2189575beb Media: Add wp_enqueue_media to easily include all media dependencies.
Also, media templates now print on `wp_footer`.

props sushkov. fixes #22060, see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22489 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 04:57:25 +00:00
Andrew Nacin e1d08f105d Translate. see #19956.
git-svn-id: https://develop.svn.wordpress.org/trunk@22486 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 04:40:56 +00:00
Daryl Koopersmith 527d232018 Media: Rename the "Beta Media" button to "Add Media". fixes #19956, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22485 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 04:35:38 +00:00
Andrew Nacin 85efa182f7 Forms with the class .wp-upload-form will now have their submit button disabled until a file is selected. props kovshenin, helenyhou, lessbloat, SergeyBiryukov, tommcfarlin. fixes #20855.
git-svn-id: https://develop.svn.wordpress.org/trunk@22459 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 23:54:03 +00:00
Andrew Nacin a95ed8d15b Put the label outside the span to ensure margins when the text wraps. props waclawjacek. fixes #19254.
git-svn-id: https://develop.svn.wordpress.org/trunk@22444 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 21:41:31 +00:00
Andrew Ozz 0493132497 More retina backgrounds and bits, props saracannon, empireoflight and lessbloat, see #21019
git-svn-id: https://develop.svn.wordpress.org/trunk@22439 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 20:54:08 +00:00
Andrew Nacin 51f16233ac Only call wp_get_object_terms() if get_object_term_cache() says there is no cache (false), which is different than no terms. props wonderboymusic, fixes #16505.
git-svn-id: https://develop.svn.wordpress.org/trunk@22433 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 20:00:51 +00:00
Andrew Nacin e6ca72f48a Fix the 'Change' button in the users list table. props c3mdigital. fixes #22034.
git-svn-id: https://develop.svn.wordpress.org/trunk@22423 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 18:34:46 +00:00
Andrew Nacin 30280a363c Remove the post-format-standard term on upgrade if it exists in the database. fixes #20697.
git-svn-id: https://develop.svn.wordpress.org/trunk@22422 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 18:01:31 +00:00
Andrew Nacin 4cf1dbe0f8 restrict_manage_users action. props jakemgold, johnjamesjacoby. fixes #19295.
git-svn-id: https://develop.svn.wordpress.org/trunk@22414 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 07:59:46 +00:00
Andrew Nacin 1d1417ec55 Always return an integer from post_exists(). props barrykooij. fixes #21607.
git-svn-id: https://develop.svn.wordpress.org/trunk@22410 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 23:27:21 +00:00
Andrew Nacin 8d1e29d8b6 Stop adding title attributes to images (in the old media uploader). props martythornley. fixes #18984.
git-svn-id: https://develop.svn.wordpress.org/trunk@22409 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 23:23:03 +00:00
Andrew Nacin b59c8c73f1 Revert [22387]. see #14466. see #22374.
git-svn-id: https://develop.svn.wordpress.org/trunk@22406 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 22:36:24 +00:00
Andrew Ozz 330c10d1a9 Kill use of colons in class names, props SergeyBiryukov, fixes #21152
git-svn-id: https://develop.svn.wordpress.org/trunk@22396 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 01:01:52 +00:00
Andrew Nacin fc2e20c4a7 Remove methods that override but do nothing. props jeremyfelt for initial patch. fixes #22368.
git-svn-id: https://develop.svn.wordpress.org/trunk@22395 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 00:52:49 +00:00
Andrew Nacin e59bf3e6d5 HiDPI versions of the generic menu page icon. props empireoflight, lessbloat. see #21019.
git-svn-id: https://develop.svn.wordpress.org/trunk@22393 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 00:25:18 +00:00
Andrew Nacin f10e3e59c5 Prefix sidebar IDs on the widgets screen with "sidebar-". props batmoo. fixes #14466.
git-svn-id: https://develop.svn.wordpress.org/trunk@22387 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 23:17:25 +00:00
Ryan Boren 6fd9916a18 Welcome screen refresh. Now with icons. Props lessbloat, empireoflight. fixes #21368
git-svn-id: https://develop.svn.wordpress.org/trunk@22379 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 21:12:46 +00:00
Andrew Nacin a23e6ae4ec Update Thickbox images for HiDPI. props lessbloat. see #21019.
git-svn-id: https://develop.svn.wordpress.org/trunk@22378 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 21:00:15 +00:00
Ryan Boren 580abb3c60 Fix strict warnings for WP_Plugins_List_Table::bulk_actions() and WP_Plugins_List_Table::single_row(). Props kurtpayne. fixes #22224
git-svn-id: https://develop.svn.wordpress.org/trunk@22376 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 18:29:20 +00:00
Ryan Boren da6ad55599 Consistent escaping in admin_color_scheme_picker(). Props johnjamesjacoby. fixes #22326
git-svn-id: https://develop.svn.wordpress.org/trunk@22375 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 18:16:23 +00:00
Ryan Boren b9890981c5 Use esc_attr() for attributes. Props johnjamesjacoby. fixes #22327
git-svn-id: https://develop.svn.wordpress.org/trunk@22373 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 18:04:50 +00:00
Andrew Nacin 52e69011ad When approving and then replying to a comment, approve the parent comment before inserting the reply. props trepmal, fixes #22000.
git-svn-id: https://develop.svn.wordpress.org/trunk@22370 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 16:49:10 +00:00
Ryan Boren 5e6ced774e Use wp_basename() instead of basename() so that multibyte characters are not stomped. Props SergeyBiryukov. fixes #21217
git-svn-id: https://develop.svn.wordpress.org/trunk@22367 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 14:33:56 +00:00
Ryan Boren 41697f3910 Attachment editor improvements. Put the non-editable metadata into the submit/publish box.
Props helenyhou
see #21391


git-svn-id: https://develop.svn.wordpress.org/trunk@22364 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 14:04:22 +00:00
Daryl Koopersmith 8fe5b79380 Add a sidebar to the media modal.
* Adds `wp.media.view.Sidebar`, to aid in rendering the sidebar.
* Removes the `directions` from the `Attachments` view and shifts search into a separate view (`wp.mce.view.Search`) that can be relocated at will. This also serves to simplify the `Attachments` view by removing the nested `list` and `$list` parameters.
* Show the toolbar on the featured image workflow, effectively requiring confirmation before closing the dialog.

see #21390, #21776, #21808.


git-svn-id: https://develop.svn.wordpress.org/trunk@22321 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-29 06:56:23 +00:00
Daryl Koopersmith 15c451d2f6 Give media a heart transplant.
Revises the concept of the media controller and workspace views (i.e. two central points of control) to be more granular. The main media object is now the `Frame`, which is a hybrid view and state machine.

The state machine is a collection of states, which are just generic instances of `Backbone.Model`. This circumvents the problem of juggling global parameters when changing states. Each state contains its own event loop. All events are also forwarded to the frame itself (as is the case in all model/collection relationships).

The frame view contains several regions, each of which can be overridden without harming or re-rendering the other regions. These work well when used in conjunction with the state machine events.

This removes the upload sidebar (don't worry, visible upload UI will return). Drag and drop uploading still works. The ability to upload has been abstracted into its own view (instead of being attached to the central workspace view).

Editing galleries is temporarily broken — the gallery creation and editing experiences will be unified in a future patch.

Adds events to detect dragging changes in `wp.Uploader` and adds methods to detect and leverage browser support for CSS3 transitions.

see #21390, #21809.


git-svn-id: https://develop.svn.wordpress.org/trunk@22320 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-28 23:29:17 +00:00
Andrew Nacin cf3fe27ca0 Cast image metadata focal_length and shutter_speed to strings to restore previous behavior when stripslashes_deep() converted these values. Avoids rounding errors without making a determination of which digit we should round to. props jcakec. fixes #22259.
git-svn-id: https://develop.svn.wordpress.org/trunk@22319 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-28 16:17:56 +00:00
Andrew Nacin 4d7b989116 Split by [\r\n\t ] rather than \s to avoid UTF-8 issues. props SergeyBiryukov. fixes #21625.
git-svn-id: https://develop.svn.wordpress.org/trunk@22306 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 21:09:42 +00:00
Andrew Nacin 208e916374 Flush rewrite rules when page_on_front is updated. props SergeyBiryukov. fixes #21274.
git-svn-id: https://develop.svn.wordpress.org/trunk@22301 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 20:20:24 +00:00
Andrew Nacin ced3c54124 Comment that the add_users capability was never used and has its days numbered. see #16719.
git-svn-id: https://develop.svn.wordpress.org/trunk@22300 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 20:18:24 +00:00