Andrew Nacin
96576a2dca
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
2012-11-21 12:05:24 +00:00
Andrew Nacin
9ad10730c0
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
2012-11-21 12:03:35 +00:00
Andrew Nacin
8f3a9e1907
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
2012-11-21 11:50:30 +00:00
Daryl Koopersmith
ff482e86fb
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
2012-11-21 11:04:23 +00:00
Daryl Koopersmith
5b11aea8f5
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
2012-11-21 10:18:59 +00:00
Andrew Nacin
3da5e3a7fc
Fix up the 'Attach' dialog on upload.php.
...
We are de-emphasising attaching (see [22630]) but this is existing
core functionality and will remain for now. This commit just cleans
it up a bit so as to be less embarrassing.
props lessbloat, helenyhou.
fixes #20164 .
git-svn-id: http://core.svn.wordpress.org/trunk@22723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 18:50:15 +00:00
Daryl Koopersmith
b75ec467b2
Media: Whoops. Remove error_log. see [22699], #21390 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 02:40:31 +00:00
Daryl Koopersmith
b1f720c616
Media: Improve media buttons on the front end.
...
* Use a less specific selector (the body, actually) to delegate opening the media dialog.
* Allow the editor ID to be the empty string so the `media_buttons` action can be called without arguments.
see #22284 , #21390 .
git-svn-id: http://core.svn.wordpress.org/trunk@22699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 02:35:30 +00:00
Andrew Nacin
c185f0c9bd
Use correct variable. see #17860 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 21:43:47 +00:00
Andrew Nacin
d88922565e
Less insane multiple role handling in the users list table.
...
If the user has more than one role, opt to show the first role that is
'editable', if present. Otherwise, fall back to the remaining roles.
In the future, we should show a comma-separated list of all roles,
editable or otherwise, and this list should be filterable, either by user,
or by the roles which can appear. Probably both.
In multisite, only hide users that have no capabilities (in case they
possess a leftover, empty wp_xx_capabilities key from the MU days),
not users that have no role, as they may have a cap but no role.
see #22361 . fixes #17860 .
git-svn-id: http://core.svn.wordpress.org/trunk@22686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 19:16:31 +00:00
Andrew Nacin
4b9ef4ee05
Remove errant return. props SergeyBiryukov. see #22186 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 09:48:34 +00:00
Andrew Nacin
bd158c503f
Move code from image_attachment_fields_to_edit() to get_attachment_fields_to_edit(). The level of abstraction is unnecessary, and it makes it more difficult to call only the filter in the new media modal. Also, that function is sloooow. see #22186 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 08:10:38 +00:00
Andrew Nacin
479d27013a
Avoid doing all of the extra work in get_attachment_fields_to_edit() for fields we will just discard. We just need the filter, and the taxonomies. see #22186 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 07:20:47 +00:00
Daryl Koopersmith
bda3b4c53d
Media: Properly display selected featured image data if the featured image is not in the first section of the library. see #22494 , #21390 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 06:56:54 +00:00
Andrew Nacin
97032e08aa
Revert page on front changes. Reverts [22127] [22129] [22135] [22136]. see #16379 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 01:28:32 +00:00
Andrew Ozz
c4fd7d119b
Welcome screen: clean up the css, improve the html, add RTL styles, props helenyhou TobiasBg ocean90, fixes #21368 , see #22453
...
git-svn-id: http://core.svn.wordpress.org/trunk@22638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-17 21:51:39 +00:00
Andrew Nacin
dc0786c0ae
Pull the list of popular importers from WordPress.org.
...
These are the importers we suggest on import.php, prompting the user to
install the relevant plugin for the import they want to go through.
If the API is inaccessible, it falls back to a hard-coded list that should
be kept sync'd with the API with each major version of WordPress. This API
enables us to add new importers between releases, as they are completed or
if services gain quick adoption. As a last resort, we can also temporarily
disable importers that are broken (due to API changes, for example).
The importer currently returns English strings (which are then run through
translate() for existing strings), but the locale is passed to the API,
allowing us to ship translated strings if we wish to be adventurous.
props dllh for the assist.
fixes #18977 .
git-svn-id: http://core.svn.wordpress.org/trunk@22632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-17 07:20:04 +00:00
Andrew Nacin
c5f94e316e
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: http://core.svn.wordpress.org/trunk@22630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-17 06:56:05 +00:00
Andrew Nacin
0a888e8aa0
Prevent notices when post_id is not passed to the old media upload forms. props ldebrouwer. fixes #22465 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-17 06:42:14 +00:00
Ryan Boren
33ac1bd021
Show the update nag in the network admin.
...
Props Mamaduka
fixes #20959
git-svn-id: http://core.svn.wordpress.org/trunk@22618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-16 21:52:48 +00:00
Andrew Nacin
f68b6006de
wp_generate_attachment_metadata() should not call WP_Image_Editor if there's nothing to resize. props mdawaffe. fixes #22438 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-14 14:26:52 +00:00
Daryl Koopersmith
fd6b847330
Media: Make edit gallery button use new media. see #21390 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-14 09:06:10 +00:00
Daryl Koopersmith
5ed166d269
Media: Activate the featured image toolbar when the media dialog is first opened. see #21390 , #21776 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-14 02:39:54 +00:00
Ryan Boren
02d80201fa
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: http://core.svn.wordpress.org/trunk@22553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-13 00:03:55 +00:00
Daryl Koopersmith
2d87f983ad
Media: Add Embed from URL tab.
...
Note: There is a bug that currently blocks adding several successive embeds.
see #21390 .
git-svn-id: http://core.svn.wordpress.org/trunk@22547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-12 05:57:12 +00:00
Daryl Koopersmith
82213846c3
Media: Add backwards compatibility for attachment_fields_to_edit and attachment_fields_to_save. see #22186 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-11 01:26:42 +00:00
Ryan Boren
31e669df5a
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: http://core.svn.wordpress.org/trunk@22538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-10 20:42:27 +00:00
Daryl Koopersmith
30e0a600bf
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: http://core.svn.wordpress.org/trunk@22532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-10 18:25:04 +00:00
Daryl Koopersmith
ead998c57d
Media: Keep the selected featured image in the media modal in sync with the page. fixes #22404 , see #21390 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-10 08:40:35 +00:00
Daryl Koopersmith
bed08350f4
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: http://core.svn.wordpress.org/trunk@22523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-10 07:51:37 +00:00
Andrew Nacin
e14ff50cfb
Don't allow non-image uploads for custom headers and backgrounds. props kovshenin. fixes #22149 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-10 05:36:37 +00:00
Ryan Boren
d3463e4aea
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: http://core.svn.wordpress.org/trunk@22510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 19:38:54 +00:00
Daryl Koopersmith
405470d264
Media: Make "update featured image" button primary. see #21776 , #21390 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 11:28:43 +00:00
Peter Westwood
06830f4501
Multisite: When displaying the upload quota and space used in the dashboard widget format them nicely.
...
git-svn-id: http://core.svn.wordpress.org/trunk@22498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 10:47:43 +00:00
Peter Westwood
b2ca616d1e
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: http://core.svn.wordpress.org/trunk@22497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 10:35:42 +00:00
Daryl Koopersmith
87caf47c0f
Media: Update featured images to use the media frame. fixes #21776 , see #21390 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 10:13:39 +00:00
Daryl Koopersmith
0a67c025e5
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: http://core.svn.wordpress.org/trunk@22489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 04:57:25 +00:00
Andrew Nacin
9d7cb4ac7a
Translate. see #19956 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 04:40:56 +00:00
Daryl Koopersmith
0a5cdbb838
Media: Rename the "Beta Media" button to "Add Media". fixes #19956 , see #21390 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 04:35:38 +00:00
Andrew Nacin
b9b9ebeeae
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: http://core.svn.wordpress.org/trunk@22459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 23:54:03 +00:00
Andrew Nacin
c26f579b13
Put the label outside the span to ensure margins when the text wraps. props waclawjacek. fixes #19254 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 21:41:31 +00:00
Andrew Ozz
1276bcefb5
More retina backgrounds and bits, props saracannon, empireoflight and lessbloat, see #21019
...
git-svn-id: http://core.svn.wordpress.org/trunk@22439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 20:54:08 +00:00
Andrew Nacin
039279db28
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: http://core.svn.wordpress.org/trunk@22433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 20:00:51 +00:00
Andrew Nacin
69d63c243d
Fix the 'Change' button in the users list table. props c3mdigital. fixes #22034 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 18:34:46 +00:00
Andrew Nacin
a5c0829f35
Remove the post-format-standard term on upgrade if it exists in the database. fixes #20697 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 18:01:31 +00:00
Andrew Nacin
dd50d7d0e0
restrict_manage_users action. props jakemgold, johnjamesjacoby. fixes #19295 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 07:59:46 +00:00
Andrew Nacin
28777ee3c4
Always return an integer from post_exists(). props barrykooij. fixes #21607 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 23:27:21 +00:00
Andrew Nacin
224a21db80
Stop adding title attributes to images (in the old media uploader). props martythornley. fixes #18984 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 23:23:03 +00:00
Andrew Nacin
9e2d46819e
Revert [22387]. see #14466 . see #22374 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 22:36:24 +00:00
Andrew Ozz
cbd737470c
Kill use of colons in class names, props SergeyBiryukov, fixes #21152
...
git-svn-id: http://core.svn.wordpress.org/trunk@22396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 01:01:52 +00:00