Commit Graph

420 Commits

Author SHA1 Message Date
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
Andrew Nacin a4687dac6f Pass the post date to wp_upload_dir() during sideloads, just as we do uploads. Ensures that sideloaded images make it into the right uploads directory.
props solarisssmoke, fixes #16777.



git-svn-id: https://develop.svn.wordpress.org/trunk@22105 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-03 18:49:37 +00:00
Ryan Boren 7a10f83cdd Respect ssl for the image src link in edit_form_image_editor(). see #21391
git-svn-id: https://develop.svn.wordpress.org/trunk@22093 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 19:51:23 +00:00
Andrew Ozz 6ffb174128 Fix "add media" icon in DFW for IE < 9, restore media-button.png, add media-button-2x.png and make them background images, see #21019
git-svn-id: https://develop.svn.wordpress.org/trunk@22077 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-28 00:33:40 +00:00
Daryl Koopersmith 1758d1aae3 Add QuickPress support for new media workflow.
* Adds the code required to include the new media scripts, styles, and settings to `media_button()`.
* Improves script dependencies, namely making `media-upload` require `media-views`.
* Some CSS tweaks for the making the new button work well with QuickPress.

see #21390, fixes #22021.


git-svn-id: https://develop.svn.wordpress.org/trunk@22072 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 20:04:34 +00:00
Andrew Nacin 513cacb398 Don't give a 'Beta Media' string to the translators that is only temporary.
git-svn-id: https://develop.svn.wordpress.org/trunk@22039 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 05:19:34 +00:00
Daryl Koopersmith 692d806fff BUTTON.
Add a "Beta Media" button to the post editor. Currently, it is only capable of inserting images. Other attachment types and galleries need not apply... yet.

* Added `wp.media.string.image( attachment, props )` for generating an image as a string from an attachment and relevant attachment display properties.
* Properly localized the gallery workflow.
* Added `Workflow.update()`, which closes the modal, triggers an `update` event, and resets the selection.
* Added `wp.mce.media` to manage the various media workflows for editors.

see #21813, #21814, #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22036 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 04:09:43 +00:00
Andrew Nacin e82d5080b8 New HiDPI spinner. Uses clean <span class="spinner"></span> markup.
Be on the lookout for weirdness.
props lessbloat. see #21456.



git-svn-id: https://develop.svn.wordpress.org/trunk@22019 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 19:57:44 +00:00
Andrew Ozz 7dc9b7a554 Add menu-vs-2x.png and 2x media-button.png, pngcrush all in wp-admin/images, props empireoflight, see #21019
git-svn-id: https://develop.svn.wordpress.org/trunk@21980 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 19:44:42 +00:00
Andrew Nacin 991be145a9 Use the regular post type UI for editing single media items (attachments).
* Attachments now go through post.php, edit_post(), the like, and have show_ui set to true.
 * Taxonomies attached to the media library now appear in the admin menu (if show_ui).
 * Editing, cropping, uploading, etc. is still very rough, but mostly functional.

API-wise:
 * New function: get_taxonomies_for_attachments(). Like get_taxonomies(), for taxonomies specifically registered against attachments.
 * Brings taxonomy support from the posts list table to the media list table. Expect them to converge soon.
 * wp_insert_attachment() now handles taxonomies like wp_insert_post(). Also expect them to converge soon.
 * New edit_form_after_title hook.

props helenyhou, ocean90. see #21391.



git-svn-id: https://develop.svn.wordpress.org/trunk@21948 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 22:52:54 +00:00
Andrew Nacin 1c58ef9f33 Updates and fixes to the new button styles. By default, buttons are now the same size as they were in 3.4. Then there is a smaller button (designed for minor elements) and a larger button (designed for things like Publish and Save Changes). Better focus styles. props lessbloat. see #21598.
git-svn-id: https://develop.svn.wordpress.org/trunk@21944 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 19:34:23 +00:00
Andrew Nacin 8aee69730b It is 'Alternative Text', not 'Alternate Text'. props alecrust, RyanJKoehler. fixes #21176.
git-svn-id: https://develop.svn.wordpress.org/trunk@21917 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 16:55:43 +00:00
Andrew Nacin ac948ddef7 Return term slugs rather than term names in attachment_fields_to_edit() as that is what we are dealing with. props eddiemoya, fixes #20765.
git-svn-id: https://develop.svn.wordpress.org/trunk@21889 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 17:34:01 +00:00
Andrew Nacin b45377f3e9 Basic phpdoc for admin includes media.php. props c3mdigital. fixes #21144.
git-svn-id: https://develop.svn.wordpress.org/trunk@21871 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 18:31:42 +00:00
Ryan Boren de06b81360 Remove return ref from all calls to get_post()
Return WP_Post from get_default_post_to_edit()
Replace all calls to get_page() with get_post()
see #21309


git-svn-id: https://develop.svn.wordpress.org/trunk@21597 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-23 20:01:10 +00:00
Ryan Boren 4974f5f233 Remove post type from post nonces. Fixes attachment deletion when EMPTY_TRASH_DAYS is 0. Props c3mdigital, kurtpayne, SergeyBiryukov. fixes #21194
git-svn-id: https://develop.svn.wordpress.org/trunk@21504 602fd350-edb4-49c9-b593-d223f7449a82
2012-08-14 18:39:15 +00:00
Ryan Boren 26b9de056c Deprecate and stub _media_button. fixes #21317
git-svn-id: https://develop.svn.wordpress.org/trunk@21353 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-26 21:33:01 +00:00
Ryan Boren aefca97f8f Deprecate and stub _insert_into_post_button(). fixes #20427
git-svn-id: https://develop.svn.wordpress.org/trunk@21352 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-26 21:30:06 +00:00
Peter Westwood 86d82ac795 Multisite: Tidy up [21256] and introduce/correct PHPDoc for a few other media upload functions.
Fixes #21179 props SergeyBiryukov.


git-svn-id: https://develop.svn.wordpress.org/trunk@21260 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-11 10:20:15 +00:00
Peter Westwood cebf4e277b Multisite: Make it easy to replace or augment the over-quota message displayed when you try and upload new media and you have reached your quota.
Fixes #21179 props dllh, jkudish. 


git-svn-id: https://develop.svn.wordpress.org/trunk@21256 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-10 13:33:44 +00:00
Mark Jaquith 4423cd9a67 Hide UI for Attachment taxonomies if show_ui is false for that taxonomy. props simonwheatley. fixes #21104
git-svn-id: https://develop.svn.wordpress.org/trunk@21240 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-09 04:56:50 +00:00
Mark Jaquith 5ab7fcea5e Better image extension regexes, so we don't just grab the "jpe" from "jpeg" files in media_sideload_image(). props sivel. fixes #16693
git-svn-id: https://develop.svn.wordpress.org/trunk@21219 602fd350-edb4-49c9-b593-d223f7449a82
2012-07-05 20:51:55 +00:00
Andrew Nacin f77b54271a Inline documentation for image_attachment_fields_to_save(). props Moraleida.me. fixes #20803.
git-svn-id: https://develop.svn.wordpress.org/trunk@21171 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-28 20:31:28 +00:00
Ryan Boren d01ad14732 Preserve context when searching in the media upload form. Props SergeyBiryukov. fixes #20856
git-svn-id: https://develop.svn.wordpress.org/trunk@21008 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-06 16:00:08 +00:00
Andrew Ozz 63e747792d Image captions: revert label change back to "Caption", fixes #18311
git-svn-id: https://develop.svn.wordpress.org/trunk@20826 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-18 02:50:05 +00:00
Ryan Boren 144b8d7135 Update upload-html-bypass string to reflect that the uploader is no longer new. Props Ipstenu. fixes #20627
git-svn-id: https://develop.svn.wordpress.org/trunk@20735 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-07 16:48:35 +00:00
Andrew Ozz 95808e088f Change the image caption shortcode format to [caption ...]<a><img /></a> caption text + html[/caption]. That way HTML tags in captions are better supported and the shortcode wouldn't break when using the wrong quotes. Props sushkov, nacin, fixes #18311
git-svn-id: https://develop.svn.wordpress.org/trunk@20679 602fd350-edb4-49c9-b593-d223f7449a82
2012-05-02 01:14:52 +00:00
Andrew Ozz a791550056 Fix typo in the error message shown when a device doesn't support uploading, props SergeyBiryukov, fixes #20410
git-svn-id: https://develop.svn.wordpress.org/trunk@20544 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-20 01:10:39 +00:00
Andrew Ozz e032e94c4f Don't hide links to the upload form and show an error for mobile devices that cannot upload, see #20410
git-svn-id: https://develop.svn.wordpress.org/trunk@20449 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-12 00:16:37 +00:00
Andrew Ozz bce0d37a67 Introduce wp_is_mobile() and use it instead of $is_iphone global, see #20014
git-svn-id: https://develop.svn.wordpress.org/trunk@20417 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-10 01:19:30 +00:00
Andrew Nacin 8fa05b041b Use _callback, rather than an unhelpful 2, for a preg_replace callback function name. Add proper phpdoc. see #20369.
git-svn-id: https://develop.svn.wordpress.org/trunk@20382 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-06 20:05:31 +00:00
Jon Cave c2450103b2 Simplify caption cleanup callbacks; if the function was called we know that the 0 index is set. See #20369.
git-svn-id: https://develop.svn.wordpress.org/trunk@20381 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-06 19:52:34 +00:00
Andrew Ozz f880b3544d Pluck a tab (whitespace), props SergeyBiryukov, see #20369
git-svn-id: https://develop.svn.wordpress.org/trunk@20377 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-06 18:26:14 +00:00
Andrew Ozz 80df7fe2cf Fix second callback when filtering caption text for shortcode, props SergeyBiryukov, fixes #20369
git-svn-id: https://develop.svn.wordpress.org/trunk@20376 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-06 17:38:49 +00:00
Ryan Boren 485e7bc261 Allow selecting custom header and background images from the media library. Props aaroncampbell, sabreuse, greuben. fixes #19840
git-svn-id: https://develop.svn.wordpress.org/trunk@20358 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-05 00:20:28 +00:00
Andrew Nacin eeee02b520 Revert label change in [20282]. see #18311.
git-svn-id: https://develop.svn.wordpress.org/trunk@20310 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-28 20:32:29 +00:00
Mark Jaquith 5fa84e63ec Wrap attachment delete link in <p> for semantics and alignment. props aaroncampbell, lancewillett. fixes #19785
git-svn-id: https://develop.svn.wordpress.org/trunk@20309 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-28 20:28:34 +00:00
Andrew Nacin 1568ee99ee Revert UI for caption fields to pre-[19982], keeping textarea for the caption field. No monospaced font, revert label. see #18311.
git-svn-id: https://develop.svn.wordpress.org/trunk@20282 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-24 13:37:42 +00:00
Andrew Ozz b88a68aad2 Don't use class="code" for the captions textareas as it resets RTL, see #18311
git-svn-id: https://develop.svn.wordpress.org/trunk@20247 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 22:48:36 +00:00
Andrew Ozz 995926a5f0 Add support for line breaks to the caption textareas, see #18311
git-svn-id: https://develop.svn.wordpress.org/trunk@20174 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-14 21:53:11 +00:00
Andrew Ozz fcbd8f7f57 Set proper HTML5 input types in the admin, props georgestephanis, fixes #17863
git-svn-id: https://develop.svn.wordpress.org/trunk@20168 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-10 01:23:48 +00:00
Andrew Ozz e169217ad0 Based on the current UX feedback, remove the "Insert Link" UI from under the caption fields, see #18311
git-svn-id: https://develop.svn.wordpress.org/trunk@20114 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-05 07:31:31 +00:00
Ryan Boren 5648306064 Pass post id to get_upload_iframe_src() instead of relying on a global. Props tott. fixes #20003
git-svn-id: https://develop.svn.wordpress.org/trunk@19999 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-27 19:23:03 +00:00
Andrew Ozz 0fa723245a HTML in image captions, first run, see #18311
git-svn-id: https://develop.svn.wordpress.org/trunk@19982 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-24 01:58:18 +00:00
Andrew Nacin 0c751dd7a3 Use relative paths for admin-ajax.php to avoid cross-domain issues with IDN domains in IE and Opera. props SergeyBiryukov, fixes #18952.
git-svn-id: https://develop.svn.wordpress.org/trunk@19871 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-08 16:12:11 +00:00
Ryan Boren cb374258bb Remove extraneuos newlines
git-svn-id: https://develop.svn.wordpress.org/trunk@19623 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-21 18:42:11 +00:00
Ryan Boren 6610e321e7 Pinking shears
git-svn-id: https://develop.svn.wordpress.org/trunk@19528 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-01 04:51:35 +00:00
Andrew Ozz 8b90f3c7e5 Sanitize options for resizing in the uploader, props mhauan, nacin, fixes #19399
git-svn-id: https://develop.svn.wordpress.org/trunk@19494 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-30 21:05:22 +00:00
Andrew Ozz 4feb285a78 Output the "After a file has been uploaded..." message by using the post-upload-ui action, fixes #18764
git-svn-id: https://develop.svn.wordpress.org/trunk@19384 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-21 20:46:15 +00:00