Commit Graph

4029 Commits

Author SHA1 Message Date
Helen Hou-Sandi 5b3c058bd5 Edit screen UI for post formats: a first run for functionality.
* Adds a very basic tabbed interface for selecting a post format (requires JS).
* Extra fields, which are post meta, are shown/hidden based on the selected format.
* Introduce a helper function for retrieving formats-specific metadata: `get_post_format_meta()`.
* Image selection uses the media modal, although without filtering or from URL support at the moment.

props rachelbaker, wonderboymusic, aaroncampbell, helen. see #19570.


git-svn-id: https://develop.svn.wordpress.org/trunk@23449 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-18 19:11:24 +00:00
Andrew Nacin 780c74d246 Remove unused variables reset by wp_reset_vars(). Many of these haven't been used since b2. see #21767.
git-svn-id: https://develop.svn.wordpress.org/trunk@23445 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 18:28:41 +00:00
Mark Jaquith c2945a394f Improve the UX of the Nav Menus screen. Kill the tabs, and change to a
dropdown, unless you have zero or one menus (which is the most common),
in which case you jump right into editing your sole menu.

Do assignment to location using checkboxes in the main menu editing
section instead of the backwards menu => location assignment in a
random meta box.

More to come, but this gets us started.

props lessbloat, DrewAPicture, jkudish. see #23119

git-svn-id: https://develop.svn.wordpress.org/trunk@23441 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 04:53:59 +00:00
Sergey Biryukov eeda24f865 Deprecate wp_convert_bytes_to_hr() in favor of size_format(). props F J Kaiser. fixes #19067.
git-svn-id: https://develop.svn.wordpress.org/trunk@23439 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 03:07:56 +00:00
Sergey Biryukov 07d596afb7 Add missing inline descriptions. see #19067.
git-svn-id: https://develop.svn.wordpress.org/trunk@23437 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 02:52:57 +00:00
Sergey Biryukov ee16ed9e0b Correct return value for comment_exists(). fixes #20494.
git-svn-id: https://develop.svn.wordpress.org/trunk@23433 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 18:49:07 +00:00
Sergey Biryukov e353d6c033 Allow filtering attachments by Author name in Media Library. props greuben. fixes #16044.
git-svn-id: https://develop.svn.wordpress.org/trunk@23430 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 17:33:28 +00:00
Mark Jaquith ead92fb39d "LGPL License" is redundant.
props wonderboymusic, jakub.tyrcha. fixes #15585

git-svn-id: https://develop.svn.wordpress.org/trunk@23425 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 16:26:46 +00:00
Ryan Boren a6c8efadb9 Change all core API to expect unslashed rather than slashed arguments.
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.

Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.

Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.

Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.

Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.

Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.

Plugins should use wp_unslash() on data being passed to core API.

Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.

Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.

Remove many no longer necessary calls to $wpdb->escape() and esc_sql().

In wp_get_referer() and wp_get_original_referer(), return unslashed data.

Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.

Switch several queries over to prepare().

Expect something to break.

Props alexkingorg
see #21767


git-svn-id: https://develop.svn.wordpress.org/trunk@23416 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 22:51:06 +00:00
Mark Jaquith 1723190616 Document the mysterious seventh parameter of add_meta_box().
props wonderboymusic, markjaquith. fixes #17515

git-svn-id: https://develop.svn.wordpress.org/trunk@23397 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-08 18:37:34 +00:00
Mark Jaquith a601e170aa Link post formats in posts list table. Use a dash for standard, like we do for absence of tags. see #16047 Next: use icons, not text descriptions.
git-svn-id: https://develop.svn.wordpress.org/trunk@23396 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-08 18:34:51 +00:00
Mark Jaquith e419f6258c Fix some tabbing issues on the post editing screen. Add Media no longer skipped when going backwards from content. Save Draft no longer skipped when going forwards from content.
props adamsilverstein. fixes #23195 and #22933

git-svn-id: https://develop.svn.wordpress.org/trunk@23395 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-08 18:30:09 +00:00
Helen Hou-Sandi efda431bc2 Open external links to plugin homepages, plugin author homepages, and theme author homepages in a new window/tab. props SergeyBiryukov. fixes #20839.
git-svn-id: https://develop.svn.wordpress.org/trunk@23394 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-08 16:20:01 +00:00
Mark Jaquith 2f6d3fed8c Display post formats in the posts list table.
props nacin, garyc40, DrewAPicture, wonderboymusic, aaroncampbell.

fixes #16047

git-svn-id: https://develop.svn.wordpress.org/trunk@23392 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-08 16:10:05 +00:00
Andrew Ozz 682b66b560 Heartbeat API: throttle down when the window looses focus or when the user is inactive, always send 'screen_id', change the interval settings to 'fast' (5sec), 'standard' (15sec) and 'slow' (60sec), the interval can be changed from PHP, see #23216
git-svn-id: https://develop.svn.wordpress.org/trunk@23382 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-03 07:03:27 +00:00
Andrew Nacin bb904fcf2b Confirm a user exists before deleting them in wp_delete_user() and wpmu_delete_user(). props scribu, fixes #23067.
git-svn-id: https://develop.svn.wordpress.org/trunk@23380 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-02 04:41:02 +00:00
Sergey Biryukov 30650e32be Return WP_Error from wp_crop_image() if saving has failed. props macbrink. fixes #23325.
git-svn-id: https://develop.svn.wordpress.org/trunk@23374 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-02 02:01:59 +00:00
Andrew Nacin 6caa05bc81 Clean up rendering of the title column in the posts list table. Simplify branching. Use get_userdata() rather than get_user_by( 'id' ). Change string to '%s is currently editing'. see #23312.
git-svn-id: https://develop.svn.wordpress.org/trunk@23372 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-02 01:54:06 +00:00
Andrew Ozz 712fcec00b Posts screen: show when a post is "locked", hide the checkbox, Quick Edit and Trash links, props dh-shredder, see #23312
git-svn-id: https://develop.svn.wordpress.org/trunk@23371 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-02 01:31:06 +00:00
Andrew Ozz 5edc6b2711 Heartbeat API: first run, see #23216
git-svn-id: https://develop.svn.wordpress.org/trunk@23355 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-29 06:15:25 +00:00
Helen Hou-Sandi a38f0e16c5 Remove the long-broken and questionably useful [more]/[less] toggle for hierarchical taxonomies in Quick/Bulk Edit. Nobody seems to have noticed in the nearly 3 years it's been broken. fixes #23006
git-svn-id: https://develop.svn.wordpress.org/trunk@23354 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-28 22:36:15 +00:00
Sergey Biryukov 44c8e7aea8 Consistently use a helper function instead of directly printing the disabled attribute.
Remove an erroneous esc_attr() call.

fixes #23194.

git-svn-id: https://develop.svn.wordpress.org/trunk@23352 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-28 03:23:01 +00:00
Sergey Biryukov 81e88f1ec3 Make sure the post exists before checking its ID. fixes #23026.
git-svn-id: https://develop.svn.wordpress.org/trunk@23351 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-28 02:55:06 +00:00
Sergey Biryukov b96d467630 Add missing inline descriptions.
props momo360modena, aaronholbrook.
see #20494, fixes #23304.

git-svn-id: https://develop.svn.wordpress.org/trunk@23350 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-28 02:20:47 +00:00
Sergey Biryukov 7b811871b6 Correct return value for WP_Filesystem_Base::gethchmod(). props bananastalktome. fixes #23121.
git-svn-id: https://develop.svn.wordpress.org/trunk@23349 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-28 01:55:39 +00:00
Dion Hulse f4beefbb88 Core Update: Fix a issue which caused automatic upgrades from 2.7 to 3.5+ to fail. Pre-2.7 WP_Filesystem::wp_content_dir() returned unslashed paths. Introduced in [22227]. See #23177
git-svn-id: https://develop.svn.wordpress.org/trunk@23297 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-11 10:16:45 +00:00
Andrew Nacin 8175cde11a Ensure we wp_die() at the end of an ajax action. see #23055.
git-svn-id: https://develop.svn.wordpress.org/trunk@23293 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-07 03:59:44 +00:00
Andrew Nacin fcbb71ad77 Whenever we have compat fields to render, send a dummy menu_order field (which was always sent in 3.4) to ensure an unchecked checkbox can still be processed by attachment_fields_to_save. fixes #22868.
git-svn-id: https://develop.svn.wordpress.org/trunk@23290 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-05 03:50:28 +00:00
Peter Westwood d927271553 Tighten our braces. Fixes #23118 props evansolomon.
git-svn-id: https://develop.svn.wordpress.org/trunk@23265 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-04 10:13:51 +00:00
Dion Hulse 17b6ada24a Upgrade: When upgrading from WordPress 3.5, if an empty twentytwelve theme directory exists, remove it to allow the installation of Twenty Twelve. See #22856. For trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@23253 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-03 07:42:16 +00:00
Andrew Nacin 6e9830f34d Don't stomp existing sizes inside wp_save_image().
props markoheijnen.
see #22985.
for trunk.



git-svn-id: https://develop.svn.wordpress.org/trunk@23246 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-03 05:23:36 +00:00
Andrew Nacin 416f98b7c8 Remove deleted files on upgrade, including wp-app.php and class-wp-atom-server.php.
props duck_
see #22855
for trunk



git-svn-id: https://develop.svn.wordpress.org/trunk@23203 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-26 20:34:30 +00:00
Helen Hou-Sandi 1303e7377a its <=> it's in documentation, along with a rogue the, The, and looses. props trepmal. fixes #22665.
git-svn-id: https://develop.svn.wordpress.org/trunk@23191 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-20 15:55:32 +00:00
Dion Hulse 0c9c23936b When copying new bundled themes & plugins, bail early if the distro doesn't include the bundled item. This prevents us from creating an empty directory in the destination when the source doesn't exist. See #22856
git-svn-id: https://develop.svn.wordpress.org/trunk@23179 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-15 03:09:50 +00:00
Andrew Nacin 05861ebb8c Use 3 * HOUR_IN_SECONDS rather than 10800.
git-svn-id: https://develop.svn.wordpress.org/trunk@23175 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-12 07:30:28 +00:00
Andrew Nacin 110c7769e5 Rip keyboard shortcuts out of the image editor help. props helenyhou. fixes #22786.
git-svn-id: https://develop.svn.wordpress.org/trunk@23106 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 09:21:27 +00:00
Mark Jaquith e0f5f47c57 Add the ability to click "Edit" and kick out to the advanced image editor from within the Media modal. New window, with "Refresh" offered on your return. fixes #22743. props koopersmith, nacin, helenyhou.
git-svn-id: https://develop.svn.wordpress.org/trunk@23095 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 05:52:19 +00:00
Mark Jaquith 93442c1773 Run the attachment_fields_to_save filter even if we don't get the fields we used to get. props nacin. fixes #22774
git-svn-id: https://develop.svn.wordpress.org/trunk@23094 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 05:34:17 +00:00
Andrew Nacin 90e5fd56c0 Fix branchhing in edit_post() where attachment_fields_to_save would only run when the alt text was sent. It should run whenever an attachment is saved. props sc0ttclark. fixes #22774.
git-svn-id: https://develop.svn.wordpress.org/trunk@23088 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 03:50:31 +00:00
Daryl Koopersmith f82ed67255 Add hidden fields via attachment_fields_to_edit to the existing compat output. props nacin. fixes #22769.
git-svn-id: https://develop.svn.wordpress.org/trunk@23086 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 03:28:21 +00:00
Andrew Nacin 1cc12103f5 Restore the Description field to the media UI in 3.5.
We tried in vain -- a noble but ultimately failed effort -- to reduce the number of fields for attachments from four (title, caption, alt, description) to one (caption for images, title otherwise). Alternative text needed to stay for accessibility reasons, of course.

Eventually title returned due to heavy plugin reliance. Description is too used by too many plugins (often times incorrectly -- the caption is more likely the proper field), hence its less-than-triumphant return today.

Version 3.5 has tried to streamline media in a number of ways. Removing fields may have been too much at once, as it forced not only a user interface change, but a paradigm change as well.

Finally, on upload we populate the description field with IPTC/EXIF captions, rather than the caption field. See #22768, this should be fixed. For now, Description stays.

This commit also restores 'Title' attribute editing to the main tab of the Edit Image dialog. The "Title" field no longer populates title attributes for <img> tags by design (for accessibility and other purposes, see #18984). So, here is a more obvious 'workaround' for the tooltip community.

Finally, this:
 * Cleans up the post.php attachment editor, including by showing a prettier form of the mime type.
 * Enables plugins to specifically hide attachment_fields_to_edit from either post.php (where you can create meta boxes) or the modal (which you may not want to clutter), for compatibility reasons.
 * Hides the 'Describe this file...' placeholder when a field is read-only in the modal.

props nacin, helenyhou.
fixes #22759.



git-svn-id: https://develop.svn.wordpress.org/trunk@23083 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 00:41:06 +00:00
Andrew Nacin 6c54baea98 Translate the 'First Steps with WordPress' Codex link. props SergeyBiryukov, fixes #22767.
git-svn-id: https://develop.svn.wordpress.org/trunk@23082 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-05 22:51:24 +00:00
Andrew Nacin a91ebc0abf Media list table: Fix the categories column, hidden thanks to a typo. props eddiemoya, fixes #22764. see #21240, #21391.
git-svn-id: https://develop.svn.wordpress.org/trunk@23081 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-05 22:49:51 +00:00
Mark Jaquith 92793b6ec2 Intelligently make media fields readonly when the user cannot update or do anything with them. props koopersmith, helenyhou, nacin. fixes #22613
git-svn-id: https://develop.svn.wordpress.org/trunk@23072 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-05 10:29:24 +00:00
Andrew Nacin 34f181654d Admin ajax: Roll back new-style error sending in set-post-thumbnail. The JS handlers know to parse an unrecognized response (like -1 or 0) as a failure. see #21776. see #22750.
git-svn-id: https://develop.svn.wordpress.org/trunk@23058 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-05 02:34:00 +00:00
Andrew Nacin 71e16147bb Use correct button class hierarchy to ensure the 'Update' button is button-large. see #21598.
git-svn-id: https://develop.svn.wordpress.org/trunk@23044 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-04 22:02:25 +00:00
Ryan Boren fa4b718809 Only show Delete in media modal if the user can delete.
Props nacin, koopersmith
fixes #22711


git-svn-id: https://develop.svn.wordpress.org/trunk@23032 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-04 18:33:51 +00:00
Ryan Boren 71d333f660 In the QuickPress media modal, use the new post id when a post is published.
Props nacin, koopersmith
fixes #22673


git-svn-id: https://develop.svn.wordpress.org/trunk@22994 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 07:17:10 +00:00
Andrew Nacin f88b538001 Bring Featured Images back into the main media dialog.
Most users don't realize that the Featured Image meta box exists; if they do, few use it.

Restores the old meta box UI, including the admin_post_thumbnail_html filter. If a plugin is using _wp_post_thumbnail_html() in conjunction with Thickbox elsewhere, it will also magically still work.

Specific underlying changes:
 * Converts the modal view to use the view manager, which means that a call to open() will automatically call render and attach if necessary.
 * Doesn't automatically set a state in wp.media, to allow code to customize the states to be added before activation.

props koopersmith.
fixes #21776.



git-svn-id: https://develop.svn.wordpress.org/trunk@22979 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 02:38:10 +00:00
Andrew Nacin d8e714d6e3 Allow the 'Uploaded to this post' view to be sorted, saving the resulting order as menu_order.
This functionality is designed to be backwards compatible with manual querying for attachments by menu_order.

props koopersmith.
see #22607.



git-svn-id: https://develop.svn.wordpress.org/trunk@22967 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 16:06:31 +00:00
Ryan Boren efe3a45b76 Namespace the dashboard widget nonce to avoid collisions with plugins.
git-svn-id: https://develop.svn.wordpress.org/trunk@22964 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 00:12:43 +00:00
Andrew Nacin d3ab1fe6b8 Remove stray single quote in attachment_submit_meta_box(). props Yogi T. fixes #22674.
git-svn-id: https://develop.svn.wordpress.org/trunk@22962 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-01 18:59:16 +00:00
Ryan Boren 780c0ec85b Properly pass WordPress uploading errors to wp.Uploader.
Props koopersmith
fixes #22655


git-svn-id: https://develop.svn.wordpress.org/trunk@22954 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 15:40:09 +00:00
Ryan Boren 06b9663f58 Refine media state machine methods.
* state( id ) becomes setState( id )
* get( id ) becomes state( id )
* state() stays the same
* previous() becomes lastState()

Props koopersmith
fixes #22652


git-svn-id: https://develop.svn.wordpress.org/trunk@22952 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 15:19:11 +00:00
Ryan Boren e06828a6c4 Add a create_posts check to _wp_translate_postdata(). Move the edit_post check to the top of the function.
Props nacin
fixes #22417


git-svn-id: https://develop.svn.wordpress.org/trunk@22950 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 14:03:47 +00:00
Ryan Boren c53137f535 Scope button classes so they can be used on the frontend without interfering with theme styles.
Props helenyhou, koopersmith
fixes #22644


git-svn-id: https://develop.svn.wordpress.org/trunk@22948 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 13:40:59 +00:00
Andrew Nacin f3da142f01 Nonces for dashboard controls.
git-svn-id: https://develop.svn.wordpress.org/trunk@22930 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 00:01:02 +00:00
Ryan Boren cdce6a366e Introduce API to add back the description field in the new media popup.
Props nacin
fixes #22642


git-svn-id: https://develop.svn.wordpress.org/trunk@22929 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-29 23:52:30 +00:00
Andrew Nacin a50c33bc44 Fix disabling of the link manager on upgrade from 3.4.2 when there are no links.
In the 3.4 branch we bumped the DB version past the version used for disabling links in trunk, preventing it from running. In the future, we must avoid increasing branch DB version bumps to HEAD.

props SergeyBiryukov.
fixes #22626.



git-svn-id: https://develop.svn.wordpress.org/trunk@22911 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-29 00:37:30 +00:00
Andrew Nacin cb529c080a Adjust size of the 'Clear List' list table button. Fix placement of other buttons next to bulk actions. props johnbillion, SergeyBiryukov, fixes #22621.
git-svn-id: https://develop.svn.wordpress.org/trunk@22906 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-28 22:20:45 +00:00
Andrew Nacin ae3472b2a2 Feature pointers:
* Finalize the text for the media pointer. Offer it for translation.
 * Remove the favorites pointer.
fixes #22454.



git-svn-id: https://develop.svn.wordpress.org/trunk@22874 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 18:58:07 +00:00
Ryan Boren d2d01ad797 Always send nocache_headers() for admin-ajax.php. This prevents iOS from caching ajax calls. http://stackoverflow.com/questions/12506897/is-safari-on-ios-6-caching-ajax-results
Turn off multi selection uploads for mobile devices. Currently Plupload cannot upload multiple files in iOS Safari. Only the first file makes it to the queue. 

Empty wp on unload to work around caching in iOS Safari.

Props azaozz, miqrogroove, nacin

fixes #22552


git-svn-id: https://develop.svn.wordpress.org/trunk@22872 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 16:17:53 +00:00
Ryan Boren 6a9c14ed5f Add a delete link to the media modal.
Props merty, nacin, koopersmith
fixes #22524


git-svn-id: https://develop.svn.wordpress.org/trunk@22869 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 15:50:59 +00:00
Ryan Boren 6099051c3e Only show the image edit button for image attachments. Props markoheijnen. fixes #22596
git-svn-id: https://develop.svn.wordpress.org/trunk@22867 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 15:06:02 +00:00
Ryan Boren 8b1ebd858a In wp_image_editor(), use wp_image_editor_supports() to check for rotation capabilities rather than directly checking the existence of the imagerotate function.
In WP_Image_Editor_GD::test(), check for existence of imagerotate if the rotate capability is required.

Props DH-Shredder
fixes #22597


git-svn-id: https://develop.svn.wordpress.org/trunk@22863 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 14:36:55 +00:00
Ryan Boren 2986ab9418 Show a better message ondmins on link-manager.php, link-add.php, link.php when links are disabled.
Props nacin
fixes #22569


git-svn-id: https://develop.svn.wordpress.org/trunk@22855 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 00:20:27 +00:00
Ryan Boren 0ba9380f4e In media_upload_flash_bypass(), pass the post id in the media-new.php url.
In media-new.php, use post_id from REQUEST if passed and the current user can edit the post.
Fixes adding media with the browser uploader.

Props nacin, ocean90
fixes #22572


git-svn-id: https://develop.svn.wordpress.org/trunk@22853 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 23:10:19 +00:00
Andrew Nacin 340a772e73 Back compat for media_buttons_context, which is not the correct filter for adding new media buttons. If you want to add additional media buttons, use the media_buttons action instead. fixes #22559.
git-svn-id: https://develop.svn.wordpress.org/trunk@22848 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 22:32:35 +00:00
Ryan Boren e12621eccb In wp.media.editor:send, revert back to the old field names used by media_upload_form_handler() for easier back compat.
Fix notices in wp_ajax_send_attachment_to_editor().

Props nacin, azaozz, miqrogroove
fixes #22553


git-svn-id: https://develop.svn.wordpress.org/trunk@22847 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 22:08:50 +00:00
Ryan Boren 7ce1968d15 In media_buttons(), consult global post_ID if get_post() comes up with nothing.
Default postID to 0 in wp_enqueue_media().

Props nacin
fixes #22085


git-svn-id: https://develop.svn.wordpress.org/trunk@22846 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 22:03:37 +00:00
Andrew Nacin 390e1756a1 Don't use wp_send_json_* handlers in the upload-attachment XHR handler.
The difference is the content type: application/json (which jQuery deserializes automatically for us) and the default text/html.

jQuery correctly handles application/json requests for IE, so we can continue to use the wp_send_json_* handlers elsewhere. Plupload rolls its own requests and does not handle application/json correctly. So, keep the standard text/html content type on upload-attachment.

props koopersmith.
see #22446.



git-svn-id: https://develop.svn.wordpress.org/trunk@22845 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 20:12:50 +00:00
Andrew Nacin a2eb48c7ab Media: When inserting an attachment, if the item is unattached (no post_parent), attach it to the post. fixes #22085.
git-svn-id: https://develop.svn.wordpress.org/trunk@22843 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 16:34:42 +00:00
Ryan Boren 8bf86e30f7 Make is_upload_space_available() available for front end page loads. Fixes fatal error when calling wp_editor() from the front end.
Props scribu, itworx
fixes #22585


git-svn-id: https://develop.svn.wordpress.org/trunk@22840 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 14:42:43 +00:00
Andrew Nacin 99097a2096 Only pass the current screen to the list table constructor when we have a screen to work with. This is not the case for admin-ajax requests. fixes #22570.
git-svn-id: https://develop.svn.wordpress.org/trunk@22838 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 03:39:29 +00:00
Andrew Nacin 1b8e6d9ac6 Use correct variable in wp_ajax_save_attachment(). see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22834 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 02:50:01 +00:00
Ryan Boren 8a75568cd4 Gettext markup for a welcome screen string. Props SergeyBiryukov, xibe. fixes #22546
git-svn-id: https://develop.svn.wordpress.org/trunk@22831 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-23 16:42:31 +00:00
Andrew Nacin 4bf9e01c2b Mustn't forget to hide the legacy media uploader! see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22828 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-22 13:23:27 +00:00
Andrew Nacin f44d1d009e WP_Image_Editor: the last stand.
* Have wp_get_image_editor() rather than WP_Image_Editor::get_instance(). Having static factory methods would be less confusing if there weren't also static methods tied to individual editor implementations.
 * Lazy-load the WP_Image_Editor base class and editor implementations.
 * Have WP_Image_Editor_GD::supports_mime_type() actually check which types it supports.
 * Deprecate gd_edit_image_support() in favor of wp_image_editor_supports().

props DH-Shredder, scribu, markoheijnen. fixes #22356. see #6821.



git-svn-id: https://develop.svn.wordpress.org/trunk@22817 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-22 09:52:16 +00:00
Andrew Nacin 5e90f834be Two initial feature pointers for WordPress 3.5: plugin favorites and the media dialog. One offered for translation. props nacin, lessbloat, DrewAPicture. see #22454.
git-svn-id: https://develop.svn.wordpress.org/trunk@22815 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-22 09:24:11 +00:00
Daryl Koopersmith ba65b3ffc7 Media: Replace the thumbnail on post.php using a request variable instead of the referer. props ocean90. fixes #21391.
git-svn-id: https://develop.svn.wordpress.org/trunk@22807 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-22 03:43:16 +00:00
Dion Hulse a88a487797 Correct get_home_path() for cases where WordPress is installed in a subdirectory called /wp/, previously it would match on /wp-admin instead of /wp causing an incorrect return path. Props SergeyBiryukov. Fixes #20449
git-svn-id: https://develop.svn.wordpress.org/trunk@22800 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 22:39:59 +00:00
Andrew Nacin e4759d815d Support attachment_fields_to_save and attachment_fields_to_edit for attachments going through post.php. see #22186. see #21391.
git-svn-id: https://develop.svn.wordpress.org/trunk@22783 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 18:53:00 +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 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
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
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
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
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 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
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 0a830bf46b 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: https://develop.svn.wordpress.org/trunk@22723 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 18:50:15 +00:00
Daryl Koopersmith bd9129fa9a Media: Whoops. Remove error_log. see [22699], #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22700 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 02:40:31 +00:00
Daryl Koopersmith 81bb685bc0 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: https://develop.svn.wordpress.org/trunk@22699 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 02:35:30 +00:00
Andrew Nacin 3f57bfeb9d Use correct variable. see #17860.
git-svn-id: https://develop.svn.wordpress.org/trunk@22689 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 21:43:47 +00:00
Andrew Nacin 6a9c6e8543 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: https://develop.svn.wordpress.org/trunk@22686 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 19:16:31 +00:00
Andrew Nacin f5fb08658f Remove errant return. props SergeyBiryukov. see #22186.
git-svn-id: https://develop.svn.wordpress.org/trunk@22679 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 09:48:34 +00:00
Andrew Nacin f4b9859903 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: https://develop.svn.wordpress.org/trunk@22673 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 08:10:38 +00:00
Andrew Nacin 4d0670723d 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: https://develop.svn.wordpress.org/trunk@22670 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 07:20:47 +00:00
Daryl Koopersmith 1fb6abded8 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: https://develop.svn.wordpress.org/trunk@22667 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 06:56:54 +00:00
Andrew Nacin 34985fbc7a Revert page on front changes. Reverts [22127] [22129] [22135] [22136]. see #16379.
git-svn-id: https://develop.svn.wordpress.org/trunk@22653 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 01:28:32 +00:00
Andrew Ozz abae868449 Welcome screen: clean up the css, improve the html, add RTL styles, props helenyhou TobiasBg ocean90, fixes #21368, see #22453
git-svn-id: https://develop.svn.wordpress.org/trunk@22638 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-17 21:51:39 +00:00
Andrew Nacin 2b88e9eb56 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: https://develop.svn.wordpress.org/trunk@22632 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-17 07:20:04 +00:00
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
Peter Westwood 4b3f786b40 i18n: Fix the usage of sprintf replacements in the Multisite admin include files. See #22260.
git-svn-id: https://develop.svn.wordpress.org/trunk@22271 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 11:28:36 +00:00
Ryan Boren 4cb0404e13 Populate WPLANG site option when setting up a network. Props SergeyBiryukov. fixes #21726
git-svn-id: https://develop.svn.wordpress.org/trunk@22257 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-17 20:29:53 +00:00
Ryan Boren 194e2775b8 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: https://develop.svn.wordpress.org/trunk@22256 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-17 18:58:09 +00:00
Ryan Boren 716617804c 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: https://develop.svn.wordpress.org/trunk@22253 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-17 13:09:17 +00:00
Andrew Ozz 2f8193421c 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: https://develop.svn.wordpress.org/trunk@22250 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 21:38:35 +00:00
Ryan Boren 8cca27df25 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: https://develop.svn.wordpress.org/trunk@22240 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 21:41:29 +00:00
Andrew Nacin 8267b431a0 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: https://develop.svn.wordpress.org/trunk@22234 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 14:19:45 +00:00
Dion Hulse 0721d15f0c 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: https://develop.svn.wordpress.org/trunk@22227 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-14 03:47:36 +00:00
Dion Hulse 832a3f51a3 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: https://develop.svn.wordpress.org/trunk@22226 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-14 02:14:17 +00:00
Daryl Koopersmith 990d50661c Add a nonce to wp_ajax_save_attachment. see #21390, #21807.
git-svn-id: https://develop.svn.wordpress.org/trunk@22212 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 16:02:45 +00:00
Daryl Koopersmith c2f4afe37e Media Modal: Check for empty keys when saving attachment captions. see #21390, #21807.
git-svn-id: https://develop.svn.wordpress.org/trunk@22200 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 21:37:44 +00:00
Ryan Boren 167cc00a84 Check for WP_Error return from WP_Image_Editor::get_instance().
Props markoheijnen
see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22192 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 18:59:41 +00:00
Andrew Nacin da1fac02ad Trailing slash the URL for the 'Visit' link in network/sites.php.
git-svn-id: https://develop.svn.wordpress.org/trunk@22190 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 17:48:42 +00:00
Daryl Koopersmith d27568e703 Caption editing in the media modal library.
* Adds a `describe` option to the workflow controller to support inline caption editing.
* For images, descriptions are mapped to the `caption` attribute.
* For other media items, descriptions are mapped to the `title` attribute.
* Descriptions are saved when the textarea's `change` event fires (i.e. when the textarea is blurred).

fixes #21807, see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22173 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 23:32:48 +00:00
Andrew Nacin f2b148799a Retina/span spinner cleanup. Restores CSS classes no longer used by core. props lessbloat. fixes #21456.
git-svn-id: https://develop.svn.wordpress.org/trunk@22167 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 20:34:19 +00:00
Andrew Nacin 76750e3883 Align QuickPress fields. props lessbloat. fixes #21754.
git-svn-id: https://develop.svn.wordpress.org/trunk@22146 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 19:07:09 +00:00
Andrew Nacin d3af38c768 Move the static front page saving routine to a single sanitize_option() callback for show_on_front. page_on_front and page_for_posts are now manually set by this callback, and not separately by options.php. see #16379.
git-svn-id: https://develop.svn.wordpress.org/trunk@22136 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-08 21:25:13 +00:00
Andrew Nacin 5ecb1e0d87 Pass the screen context directly to get_sample_permalink_html(). see #16379.
git-svn-id: https://develop.svn.wordpress.org/trunk@22129 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 03:44:30 +00:00
Ryan Boren 3368f400e6 Better UI for doing "Page on Front".
Props SergeyBiryukov, lessbloat, nacin.

see #16379


git-svn-id: https://develop.svn.wordpress.org/trunk@22127 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-06 15:19:29 +00:00
Ryan Boren 8d5ca186c2 Consolidate some strings. Props pavelevap, SergeyBiryukov. see #21728
git-svn-id: https://develop.svn.wordpress.org/trunk@22124 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-05 19:04:34 +00:00
Daryl Koopersmith d43c390e2b Use the new media modal to insert galleries into TinyMCE and the text editor.
'''Galleries'''

* Gallery insertion from the new media modal (into TinyMCE, the text editor, etc).
* Gallery previews in TinyMCE now use the `wp.mce.views` API.
* Disables the TinyMCE `wpgallery` plugin.
* Gallery previews consist of the first image of the gallery and the appearance of a stack. This will later be fleshed out to include more images/functionality (including editing the gallery, gallery properties, and showing the number of images in the gallery).
* Multiple galleries can be added to a single post.
* The gallery MCE view provides a bridge between the `wp.shortcode` and `Attachments` representation of a gallery, which allows the existing collection to persist when a gallery is initially created (preventing a request to the server for the query).


'''Shortcodes'''

* Renames `wp.shortcode.Match` to `wp.shortcode` to better expose the shortcode constructor.
* The `wp.shortcode` constructor now accepts an object of options instead of a `wp.shortcode.regexp()` match.
* A `wp.shortcode` instance can be created from a `wp.shortcode.regexp()` match by calling `wp.shortcode.fromMatch( match )`.
* Adds `wp.shortcode.string()`, which takes a set of shortcode parameters and converts them into a string.* Renames `wp.shortcode.prototype.text()` to `wp.shortcode.prototype.string()`.
* Adds an additional capture group to `wp.shortcode.regexp()` that records whether or not the shortcode has a closing tag. This allows us to improve the accuracy of the syntax used when transforming a shortcode object back into a string.

'''Media Models'''

* Prevents media `Query` models from observing the central `Attachments.all` object when query args without corresponding filters are set (otherwise, queries quickly amass false positives).
* Adds `post__in`, `post__not_in`, and `post_parent` as acceptable JS attachment `Query` args.
* `Attachments.more()` always returns a `$.promise` object.

see #21390, #21809, #21812, #21815, #21817.


git-svn-id: https://develop.svn.wordpress.org/trunk@22120 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-05 04:23:59 +00:00
Ryan Boren 9d85e6b9d0 Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865
git-svn-id: https://develop.svn.wordpress.org/trunk@22117 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 18:37:43 +00:00
Ryan Boren 1b3f54d73d Reduce use of global. Use get_blog_details() instead. fixes #22090
git-svn-id: https://develop.svn.wordpress.org/trunk@22108 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 12:40:09 +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
Daryl Koopersmith 163f99b942 Refine button styles, notably the gray buttons.
* Crisper edges, fewer outer shadows.
* Higher contrast borders on the gray buttons.
* Separates `button-large` from `button-primary`, and removes the `regular` override class.

props hugobaeta, helenyhou, lessbloat. see #21598.


git-svn-id: https://develop.svn.wordpress.org/trunk@22099 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-02 23:38:21 +00:00
Ryan Boren 7790af3154 Introduce WP_Image_Editor, WP_Image_Editor_Imagick, and WP_Image_Editor_GD. Abstracts image editing API and adds support for ImageMagick.
Props DH-Shredder, kurtpayne, markoheijnen
see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22094 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 20:59:06 +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
Ryan Boren 42cfdfb614 * Register blog-id-cache group as global
* Introduce clean_blog_cache() so we can run it independently of refresh_blog_details() which assumes the blog still exists and get_blog_details() can be called.
* Don't db escape cache keys in get_blog_id_from_url()
* prepare() the query in get_blog_id_from_url()
* Return 0 for all failures in get_blog_id_from_url()
* clean_blog_cache() after dropping tables in wpmu_delete_blog() to make sure the cache is for real cleaned.



git-svn-id: https://develop.svn.wordpress.org/trunk@22092 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 18:03:23 +00:00
Ryan Boren 0d5f429651 Initialize to avoid notice. Props bradyvercher. fixes #22050
git-svn-id: https://develop.svn.wordpress.org/trunk@22091 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 16:09:16 +00:00
Andrew Nacin 6467281a2b Provide no-customize fallback to the welcome screen. Use the customize overlay rather than a page reload. see #21368.
git-svn-id: https://develop.svn.wordpress.org/trunk@22089 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 14:58:05 +00:00
Ryan Boren 43e28ec704 Handle screen arg in WP_Comments_List_Table constructor. Avoids warning when calling WP_Screen::get() later. fixes #22039
git-svn-id: https://develop.svn.wordpress.org/trunk@22085 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-29 10:05:15 +00:00
Dion Hulse 6312ae8e06 Make WP_Filesystem_Base::getnumchmodfromh() return the expected values when the executable bit is set in the input. Props Keruspe. Fixes #20365
git-svn-id: https://develop.svn.wordpress.org/trunk@22083 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-29 01:33:15 +00:00
Andrew Nacin 7e3e82dd32 Map 'all' to no status for get_comments() in the list table. See #21101.
git-svn-id: https://develop.svn.wordpress.org/trunk@22081 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-28 21:46:24 +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 d6d359a1bc Move wp_max_upload_size and dependencies to wp-includes. props johnjamesjacoby. see #21390, fixes #21867.
git-svn-id: https://develop.svn.wordpress.org/trunk@22073 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 20:59:57 +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 6a54459a18 Make Twenty Twelve the default theme for new installs. props markoheijnen, SergeyBiryukov. see #21789.
git-svn-id: https://develop.svn.wordpress.org/trunk@22054 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 07:47:51 +00:00
Daryl Koopersmith 6fff91f4d1 Media JS: Move the modal box's title from being stored in the modal view to being stored as an attribute on the workflow. Update modal titles for both the post media and featured image workflows. see #21390, #21776.
git-svn-id: https://develop.svn.wordpress.org/trunk@22044 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 06:20:22 +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 8803a95bc3 Browse and install your wordpress.org plugin favorites from the plugin installer. props Otto42, Japh, DrewAPicture. fixes #22002.
git-svn-id: https://develop.svn.wordpress.org/trunk@22026 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 00:47:01 +00:00
Daryl Koopersmith 749fcf84f9 Limit the featured image workflow to images only.
Adds the ability to set the values used to instantiate both the Workflow's library and selection.
Renames the Workflows internal `_pending` variable to prevent conflicts with a similarly named internal `Backbone.Model` variable.

see #21390, #21776.


git-svn-id: https://develop.svn.wordpress.org/trunk@22022 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 21:40:02 +00:00
Daryl Koopersmith 4a90e0541a Media JS: Add support for filtering Attachment collections by mime type. see #21390, #21776, #21809.
git-svn-id: https://develop.svn.wordpress.org/trunk@22021 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 20:50:13 +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 Nacin 119bd9f50a New design and content for the welcome panel. First pass.
props lessbloat, helenyhou, georgestephanis, sabreuse, ryelle.
see #21368.



git-svn-id: https://develop.svn.wordpress.org/trunk@22018 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 19:44:43 +00:00
Dion Hulse 45d9a3e5f7 Move win_is_writable() from wp-admin/includes to wp-includes so that it's always available for get_temp_dir(). Fixes #20778
git-svn-id: https://develop.svn.wordpress.org/trunk@22009 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 05:08:26 +00:00
Andrew Nacin ff88489bdc Remove the 'Size of the post box' (default_post_edit_rows) option. This will instead be handled by a user cookie tracking the resizing of both TinyMCE and the main textarea. see #21718.
git-svn-id: https://develop.svn.wordpress.org/trunk@22006 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 03:17:28 +00:00
Andrew Nacin 84ca011876 Always attempt to embed URLs in content, removing the Auto-embeds (autoembed_urls) option.
Remove the UI for setting the default width and height for embeds. Width was confusing as it
was blank by default (inheriting the content width from the theme, or 500px). The height is
now calculated as 1.5x the content width, or 1000px, whichever is smaller.

The [embed] shortcode can still receive manual height and width attributes. This just removes
the global settings.

props wonderboymusic. see #21719.



git-svn-id: https://develop.svn.wordpress.org/trunk@21998 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 07:10:09 +00:00
Andrew Nacin 774a12be83 Introduce constants to allow for easier expression of time periods in seconds. Adds MINUTE_IN_SECONDS, HOUR_IN_SECONDS, DAY_IN_SECONDS, WEEK_IN_SECONDS, YEAR_IN_SECONDS. props nbachiyski, SergeyBiryukov. fixes #20987.
git-svn-id: https://develop.svn.wordpress.org/trunk@21996 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 05:26:19 +00:00
Andrew Nacin 8d742284b8 Use get_bloginfo('version', 'display') for displaying the WP version number in the admin. Can allow for filtering -- for example, showing the SVN revision. props SergeyBiryukov, see #18629.
git-svn-id: https://develop.svn.wordpress.org/trunk@21986 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 21:27:28 +00:00
Andrew Nacin 4f8de0690c Add restrict_manage_comments hook. props hardy101. fixes #21344.
git-svn-id: https://develop.svn.wordpress.org/trunk@21985 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 21:23:43 +00:00
Ryan Boren 93eb987e6c The edit-tags screen ID does not contain the post_type. Fallback to post_type in the REQUEST. Fixes AJAX term addtions from edit-tags.php. fixes #21871
git-svn-id: https://develop.svn.wordpress.org/trunk@21982 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 20:39:53 +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 7e7750fd52 Add back the space between class names removed in [21914]. see #21871.
git-svn-id: https://develop.svn.wordpress.org/trunk@21974 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 16:42:50 +00:00
Andrew Nacin 818598ac2c Deprecate wp_create_thumbnail(). props obenland. fixes #21555.
git-svn-id: https://develop.svn.wordpress.org/trunk@21956 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 17:48:24 +00:00
Andrew Nacin b401b8d14d Better alignment in the ustom fields metabox. props SergeyBiryukov, ocean90, fixes #21847.
git-svn-id: https://develop.svn.wordpress.org/trunk@21955 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 17:42:46 +00:00
Andrew Nacin 620b94181c Remove old autosave collision code from edit_post(). props miqrogroove.
This code, which could block autosaves when drafts had future timestamps,
dates to before autosaves were saved as revisions and is no longer necessary.

fixes #21858.



git-svn-id: https://develop.svn.wordpress.org/trunk@21949 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-22 02:11:09 +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
Peter Westwood a9673a9147 Export: Ignore auto-drafts when building the list of users for the export file. Fixes #21960.
git-svn-id: https://develop.svn.wordpress.org/trunk@21946 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 21:48:52 +00:00
Andrew Nacin 8565aa6e34 Reset $taxonomy in single_row's default branch. props tott. fixes #21240.
git-svn-id: https://develop.svn.wordpress.org/trunk@21945 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 20:28:25 +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
Peter Westwood d86f9f140f Posting: Improve the invalid date protection code based on feedback from nacin.
* Introduce a wp_checkdate() function with a single filter to centralise the code that validates dates.
 * Improve the error message
 * Correctly handle the return value of wp_insert_post which is not always a WP_Error on failure

Fixes #17180


git-svn-id: https://develop.svn.wordpress.org/trunk@21922 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 10:46:50 +00:00
Peter Westwood 59dd4b7d2b Posting: Make it much harder to create posts with invalid dates by enforcing the post date tests in the UI and the backend code.
Previously you could quite easily send a new post into the back of beyond by specifying an invalid date like the 30th Feb and this was very confusing.
Sometimes it would seem to work and sometimes the post would end up very far in the past - depending on the mysql version and other factors.

Fixes #17180 props jkudish.


git-svn-id: https://develop.svn.wordpress.org/trunk@21921 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 21:43:35 +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
Ryan Boren 7c52a19a5a Reduce reliance on global variables in the list tables. Allow passing a screen ID to the list tables so that ajax handlers can set the needed screen.
Props nacin
fixes #21871


git-svn-id: https://develop.svn.wordpress.org/trunk@21914 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 12:43:31 +00:00
Andrew Nacin 30cc580f76 Avoid mangling UTF-8 strings that may be present in image metadata. props SergeyBiryukov for the unit tests [UT665]. fixes #9417.
git-svn-id: https://develop.svn.wordpress.org/trunk@21905 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 23:38:25 +00:00
Andrew Nacin 0ed8541439 Replace QuickPress labels with gray prompt texts. Stylish, but also done for localization purposes (string lengths). props ocean90. fixes #21754.
git-svn-id: https://develop.svn.wordpress.org/trunk@21894 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 18:45:44 +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 64dec4d525 Move the Cancel button for replying and quick-editing a comment to after the primary update/reply button so tabbing from the comment field takes you to the primary action. see #21340.
git-svn-id: https://develop.svn.wordpress.org/trunk@21883 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-17 22:13:53 +00:00
Andrew Nacin c154aed908 Remove unused $t_time variable. props ocean90. fixes #18531.
git-svn-id: https://develop.svn.wordpress.org/trunk@21880 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-17 02:12:09 +00:00
Andrew Ozz 7485a0ceed Admin menu: add phpdoc/inline comments describing the usage of the param $icon_url in add_menu_page(), add string 'none' to be used when a menu icon is added from CSS, switch core items in the admin menu to use 'none', fixes #21349
git-svn-id: https://develop.svn.wordpress.org/trunk@21877 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 22:51:44 +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
Andrew Nacin fee76161e3 Don't use hard-coded indexes when dealing with an array of roles. props elyobo. fixes #19222.
git-svn-id: https://develop.svn.wordpress.org/trunk@21866 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 16:24:33 +00:00
Andrew Nacin 50daa191c2 Trim incoming searches on the users list table. props tollmanz. fixes #21318.
git-svn-id: https://develop.svn.wordpress.org/trunk@21864 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 16:11:01 +00:00
Andrew Nacin afbbc9665a Combine some strings. props pavelevap. fixes #21087.
git-svn-id: https://develop.svn.wordpress.org/trunk@21857 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-15 19:57:05 +00:00
Andrew Nacin f62839c45b Fold Privacy Settings into Reading Settings, moving blog_public (search engine/robots) to options-reading and removing options-privacy.
When blog_public only has two values (as judged by whether the blog_privacy_selector action is used), convert from radio buttons to a checkbox, and rename from 'Site Visibility' to a more specific 'Search Engine Visibility'.

The text and implementation may change a bit. see #16416.



git-svn-id: https://develop.svn.wordpress.org/trunk@21838 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 17:28:57 +00:00
Andrew Nacin 2313f09a45 Correct return values for two deprecated media admin functions. props SergeyBiryukov. fixes #21518.
git-svn-id: https://develop.svn.wordpress.org/trunk@21835 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 17:09:41 +00:00
Andrew Nacin 8d3a9ba45b Disable multisite quotas by default on new installs. props mpvanwinkle77. fixes #21513.
git-svn-id: https://develop.svn.wordpress.org/trunk@21827 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-12 15:48:40 +00:00
Andrew Nacin 7f29924c6a Remove ms-files.php rewriting from WordPress multisite. fixes #19235.
Keep existing networks compatible with a ms_files_rewriting network option.



git-svn-id: https://develop.svn.wordpress.org/trunk@21823 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 22:22:20 +00:00
Andrew Nacin dfac91464f Remove AtomPub from core.
* Will be replaced with http://wordpress.org/extend/plugins/atom-publishing-protocol/.
 * Introduces an action, xmlrpc_rsd_apis, to add APIs to xmlrpc.php?rsd.
 * Introduces support for 'error' being 403 and 50x in class-wp.php.
 * Removes 'Remote Publishing' from Writing Settings (see [21804]). Keeps the remote_publishing settings section.

DB version is bumped to generate the new wp-app rewrite rule and remove the old enable_app option.

props wonderboymusic.
fixes #21509.



git-svn-id: https://develop.svn.wordpress.org/trunk@21818 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 20:11:39 +00:00
Andrew Nacin 533217f3ba Indicate on themes.php when a theme is a child that requires a parent theme. fixes #17944.
git-svn-id: https://develop.svn.wordpress.org/trunk@21816 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 19:12:37 +00:00
Ryan Boren e40aee3913 Avoid 'Creating default object from empty value' warning in PHP 5.4. Props SergeyBiryukov, knutsp. fixes #21716
git-svn-id: https://develop.svn.wordpress.org/trunk@21815 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 18:54:56 +00:00
Daryl Koopersmith 1cc9c42bc4 Use JS Attachment models in wp.Uploader. fixes #21868.
Moves the uploading Attachments queue from the media workspace view to the uploader itself. This ensures that all attachments are added to the central attachmnet store.

Updates wp.Uploader to pass Attachment models to callbacks instead of Plupload file objects. Attachments in the process of uploading have a reference to the file object (which can be fetched by calling `attachment.get('file');`).

Also updates the customizer to be compatible with the API changes.


git-svn-id: https://develop.svn.wordpress.org/trunk@21814 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 16:55:58 +00:00
Andrew Nacin ee88036c08 Use network_site_url() for wp-signup.php. props markjaquith. see #19796.
git-svn-id: https://develop.svn.wordpress.org/trunk@21813 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 12:27:25 +00:00
Andrew Nacin 6557b319c4 Use the key we found using array_search() to unset it from the array. props hakre. fixes #16562.
git-svn-id: https://develop.svn.wordpress.org/trunk@21812 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 02:12:34 +00:00
Andrew Nacin 56c0d2932c Remove old edit_*_per_page usermeta keys.
These per-page values were when the post type or taxonomy name has a hyphen.
Previously, these were converted to underscores. This changed in [21322].

fixes #18958.



git-svn-id: https://develop.svn.wordpress.org/trunk@21811 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 02:08:29 +00:00
Andrew Nacin 1e270f44a4 Remove 'hwstring_small' from attachment metadata and deprecate get_udims(). props SergeyBiryukov. fixes #21518.
git-svn-id: https://develop.svn.wordpress.org/trunk@21808 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 01:38:26 +00:00
Andrew Nacin 7846681ed4 Don't show 'Uncategorized' in the category column on edit.php if there are no categories (including the default one). props ocean90. fixes #21240.
git-svn-id: https://develop.svn.wordpress.org/trunk@21806 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 01:31:53 +00:00
Andrew Nacin 6df2aff40b Turn XML-RPC on and remove the option on the Writing Settings page.
props markoheijnen for the initial patch.

Introduces a new filter, xmlrpc_enabled.

Respects any current callbacks registered to the pre_option_enable_xmlrpc
and option_enable_xmlrpc filters, for anyone forcing it off via code.

fixes #21509.



git-svn-id: https://develop.svn.wordpress.org/trunk@21804 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 00:37:31 +00:00
Andrew Nacin 31b1ba5cb1 Wrap the unused options line in populate_options().
git-svn-id: https://develop.svn.wordpress.org/trunk@21803 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 00:08:58 +00:00
Ryan Boren 34320e9089 Add missing closedir() to wpmu_delete_blog(). Props timfs. fixes #21780
git-svn-id: https://develop.svn.wordpress.org/trunk@21801 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-10 21:16:03 +00:00
Ryan Boren 46f3985c39 Deprecate get_default_post_to_edit(). Props SergeyBiryukov. fixes #21677
git-svn-id: https://develop.svn.wordpress.org/trunk@21800 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-10 20:39:45 +00:00
Ryan Boren fa5557c6d4 When reassigning posts and links during user deletion, clear the post and link caches. Props kurtpayne. fixes #20447
git-svn-id: https://develop.svn.wordpress.org/trunk@21798 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-10 19:56:08 +00:00
Ryan Boren 9360033fbe Check for an empty post in wp_popular_terms_checklist(). _wp_ajax_add_hierarchical_term() doesn't set up global post info. Props SergeyBiryukov. see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@21791 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-10 16:45:49 +00:00