Commit Graph

3713 Commits

Author SHA1 Message Date
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
Andrew Nacin
c2257fcba3 Remove methods that override but do nothing. props jeremyfelt for initial patch. fixes #22368.
git-svn-id: http://core.svn.wordpress.org/trunk@22395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 00:52:49 +00:00
Andrew Nacin
9fadd65859 HiDPI versions of the generic menu page icon. props empireoflight, lessbloat. see #21019.
git-svn-id: http://core.svn.wordpress.org/trunk@22393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 00:25:18 +00:00
Andrew Nacin
bc93c0fdc5 Prefix sidebar IDs on the widgets screen with "sidebar-". props batmoo. fixes #14466.
git-svn-id: http://core.svn.wordpress.org/trunk@22387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 23:17:25 +00:00
Ryan Boren
6757005b59 Welcome screen refresh. Now with icons. Props lessbloat, empireoflight. fixes #21368
git-svn-id: http://core.svn.wordpress.org/trunk@22379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 21:12:46 +00:00
Andrew Nacin
32ad332432 Update Thickbox images for HiDPI. props lessbloat. see #21019.
git-svn-id: http://core.svn.wordpress.org/trunk@22378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 21:00:15 +00:00
Ryan Boren
44774b52ab Fix strict warnings for WP_Plugins_List_Table::bulk_actions() and WP_Plugins_List_Table::single_row(). Props kurtpayne. fixes #22224
git-svn-id: http://core.svn.wordpress.org/trunk@22376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 18:29:20 +00:00
Ryan Boren
b10f343480 Consistent escaping in admin_color_scheme_picker(). Props johnjamesjacoby. fixes #22326
git-svn-id: http://core.svn.wordpress.org/trunk@22375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 18:16:23 +00:00
Ryan Boren
3eabc7db5a Use esc_attr() for attributes. Props johnjamesjacoby. fixes #22327
git-svn-id: http://core.svn.wordpress.org/trunk@22373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 18:04:50 +00:00
Andrew Nacin
e79b028a08 When approving and then replying to a comment, approve the parent comment before inserting the reply. props trepmal, fixes #22000.
git-svn-id: http://core.svn.wordpress.org/trunk@22370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 16:49:10 +00:00
Ryan Boren
53c0024945 Use wp_basename() instead of basename() so that multibyte characters are not stomped. Props SergeyBiryukov. fixes #21217
git-svn-id: http://core.svn.wordpress.org/trunk@22367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 14:33:56 +00:00
Ryan Boren
ad724f3b7b Attachment editor improvements. Put the non-editable metadata into the submit/publish box.
Props helenyhou
see #21391


git-svn-id: http://core.svn.wordpress.org/trunk@22364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 14:04:22 +00:00
Daryl Koopersmith
f7c1aaf26d 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: http://core.svn.wordpress.org/trunk@22321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-29 06:56:23 +00:00
Daryl Koopersmith
53ccb09bce 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: http://core.svn.wordpress.org/trunk@22320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-28 23:29:17 +00:00
Andrew Nacin
f965ff1c84 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: http://core.svn.wordpress.org/trunk@22319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-28 16:17:56 +00:00
Andrew Nacin
076ede55f2 Split by [\r\n\t ] rather than \s to avoid UTF-8 issues. props SergeyBiryukov. fixes #21625.
git-svn-id: http://core.svn.wordpress.org/trunk@22306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-25 21:09:42 +00:00
Andrew Nacin
fac0ce8ec7 Flush rewrite rules when page_on_front is updated. props SergeyBiryukov. fixes #21274.
git-svn-id: http://core.svn.wordpress.org/trunk@22301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-25 20:20:24 +00:00
Andrew Nacin
d08bf937de Comment that the add_users capability was never used and has its days numbered. see #16719.
git-svn-id: http://core.svn.wordpress.org/trunk@22300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-25 20:18:24 +00:00
Peter Westwood
4f2173666d i18n: Fix the usage of sprintf replacements in the Multisite admin include files. See #22260.
git-svn-id: http://core.svn.wordpress.org/trunk@22271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-23 11:28:36 +00:00
Ryan Boren
f742b675be Populate WPLANG site option when setting up a network. Props SergeyBiryukov. fixes #21726
git-svn-id: http://core.svn.wordpress.org/trunk@22257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-17 20:29:53 +00:00
Ryan Boren
1714e085e4 Don't create {$blog_id}_user-settings, {$blog_id}_user-settings-time, and {$blog_id}_dashboard_quick_press_last_post_id user options when a super admin visits a site they aren't a member of. Instead, rely solely on the wp-settings cookie.
fixes #22178


git-svn-id: http://core.svn.wordpress.org/trunk@22256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-17 18:58:09 +00:00
Ryan Boren
bcbc0b65ac Allow numbers in screen option IDs. Fixes setting posts per page for custom post types containing 0-9. Props SergeyBiryukov. fixes #18323
git-svn-id: http://core.svn.wordpress.org/trunk@22253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-17 13:09:17 +00:00
Andrew Ozz
e6fe8c83a3 Tab indexes: when tabbing out of the editors make sure the next focused element is the expected/default action, fix focusing the next field when picking a date for future post, props lessbloat, fixes #21340
git-svn-id: http://core.svn.wordpress.org/trunk@22250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-16 21:38:35 +00:00
Ryan Boren
ba79e04c10 In populate_network(), distinguish between upgrading from single to multisite and creating a new network in an existing multisite environment. When creating a new network steps related to setting up the main site must be skipped since the main site is created after populate_network() runs. Further, the global should not be modified since populating a new network does not involve switching to that network and making it current. fixes #22090
git-svn-id: http://core.svn.wordpress.org/trunk@22240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-15 21:41:29 +00:00
Andrew Nacin
26445266d4 In nav menus, avoid firing the magic WP_Post getter for potentially non-existent properties, which results in a metadata cache hit. see #22189.
git-svn-id: http://core.svn.wordpress.org/trunk@22234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-15 14:19:45 +00:00
Dion Hulse
93ad22d868 Replace the hard coded version and PHP/MySQL requirements in update-core.php by pulling in the new version.php file during installation. Fixes #22015 #11639. See #21789
git-svn-id: http://core.svn.wordpress.org/trunk@22227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-14 03:47:36 +00:00
Dion Hulse
04448de6bb When upgrading a site to/from a Beta, alpha, or non-stable release, overwrite any existing bundled themes & plugins with the version from the release zip. See #21789
git-svn-id: http://core.svn.wordpress.org/trunk@22226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-14 02:14:17 +00:00
Daryl Koopersmith
3ee553c6bc Add a nonce to wp_ajax_save_attachment. see #21390, #21807.
git-svn-id: http://core.svn.wordpress.org/trunk@22212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-12 16:02:45 +00:00