Commit Graph

10501 Commits

Author SHA1 Message Date
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
Andrew Nacin b6b9eef8bd A calmer, less distracting style for the TinyMCE toolbar.
props helenyhou, lessbloat, trepmal, fadingdust.
fixes #18141.



git-svn-id: https://develop.svn.wordpress.org/trunk@22016 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 18:24:02 +00:00
Ryan Boren 8628f13d69 Don't read from the switched global. Instead use _wp_switched_stack. switched is retained for back compat and should not be directly read since it is prone to stompage by plugins. see #21459
git-svn-id: https://develop.svn.wordpress.org/trunk@22015 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 17:02:44 +00:00
Daryl Koopersmith af4607a11e Media JS: Use correct reference to search term in the Attachments model search filter. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22013 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 15:13:22 +00:00
Daryl Koopersmith 0dd940e0c1 First pass on TinyMCE attachment in-editor UI.
* Adds in-editor UI for image attachments. Most of this UI should be able to migrate to all images in a future commit.
* Removes the wpeditimage TinyMCE plugin from the default plugins array.
* Add `wp.media.fit`, a helper method to constrain dimensions based upon a maximum width and/or height.
* Add html attribute parsing and string generation utilities (currently stored in mce-views).
* Calling `remove` on a TinyMCE views now ensures that the the parent and references are removed as well.
* Fixes a bug where we weren't sending the full array of results to matches in wp.mce.view.

see #21390, #21812, #21813.



git-svn-id: https://develop.svn.wordpress.org/trunk@22012 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 14:12:54 +00:00
Ryan Boren 4c29375d2c Convert the object in the posts array to WP_Post only if the posts array is not empty. Some post caching plugins can cause it to be empty. see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@22011 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 12:32:54 +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
Dion Hulse 2e9dc20515 Rearrange the order that we check for temporary directories in get_temp_dir(). This change causes us to use System temporary directories in preference to WP_CONTENT_DIR, for better windows compatibility, we use win_is_writable() as well. Props simonwheatley and kurtpayne for initial patches, See #20778
git-svn-id: https://develop.svn.wordpress.org/trunk@22008 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 05:02:58 +00:00
Andrew Ozz 5ad7fe8cd6 Main editor: maintain the height when switching Visual to Text and back, save the height when resizing as user state, output the height in the textarea tag when loading, (thanks @nacin for the help), fixes #21718
git-svn-id: https://develop.svn.wordpress.org/trunk@22007 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 03:30:21 +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 bc47e0cb3a Add a comment to get_shortcode_regex() mentioning its near clones elsewhere. see #21996.
git-svn-id: https://develop.svn.wordpress.org/trunk@22005 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 01:16:31 +00:00
Daryl Koopersmith c133581a81 Add JavaScript methods for handling shortcodes.
Adds `wp.shortcode`, a set of methods used for parsing shortcodes out of content. Also adds a default set of shortcode properties to `wp.mce.view`.

fixes #21996, see #21812, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22004 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 01:00:08 +00:00
Andrew Nacin ac3acca992 Add soundcloud and slideshare to the oEmbed providers list. props bradparbs, ericwahlforss, wonderboymusic. fixes #15734, #21635.
git-svn-id: https://develop.svn.wordpress.org/trunk@22003 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 23:42:53 +00:00
Andrew Nacin ab2f77ebd0 Move WP_Embed into its own file. props ocean90. fixes #20533.
git-svn-id: https://develop.svn.wordpress.org/trunk@21999 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 08:39:26 +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 14592e8dd1 Do not use time constants in files the WP bootstrap is not or may not be loaded. see #20987.
git-svn-id: https://develop.svn.wordpress.org/trunk@21997 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 07:05:48 +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 853793ab16 Add get() and set() methods to WP_User_Query for modifying query variables the way you might with WP_Query. props wonderboymusic. fixes #21426.
git-svn-id: https://develop.svn.wordpress.org/trunk@21995 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 05:01:59 +00:00
Andrew Nacin 248b586911 Move sanitization for the multisite illegal_names, limited_email_domains, and banned_email_domains options to sanitize_option(). props wonderboymusic. fixes #21552.
git-svn-id: https://develop.svn.wordpress.org/trunk@21993 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-25 01:54:12 +00:00
bumpbot cb220ab2ba Compress scripts/styles: 3.5-alpha-21989.
git-svn-id: https://develop.svn.wordpress.org/trunk@21989 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 22:58:42 +00:00
Ryan Boren a0edbbedb7 Handle pre-flighted OPTIONS requests in send_origin_headers(). Props nacin. fixes #21024
git-svn-id: https://develop.svn.wordpress.org/trunk@21988 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 21:39:04 +00:00
Andrew Nacin c048b4a3d4 Auto feeds for post type archives. props mgdl, wonderboymusic. fixes #21648.
git-svn-id: https://develop.svn.wordpress.org/trunk@21984 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 21:21:29 +00:00
Ryan Boren d9b4325db3 Fetch full terms for the post_category and tags_input queries and then wp_list_pluck() the desired fields. Fetching full terms primes the cache and reduces overall queries. Add cache invalidation to wp_set_post_terms(). Props scribu. see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@21981 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 20:35:56 +00:00
Ryan Boren 411e1819b6 * Invalidate the get_id_from_blogname_* cache in refresh_blog_details()
* Change $name to $slug in get_id_from_blogname() for some semblance of clarity.
* Strip leading and trailing slashes from the slug in get_id_from_blogname() so get_blog_details()->path can be passed directly.

Props wonderboymusic
see #20950


git-svn-id: https://develop.svn.wordpress.org/trunk@21979 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 19:31:37 +00:00
Andrew Nacin 9ce4af9bd4 Close label. props lancewillett, fixes #21064.
git-svn-id: https://develop.svn.wordpress.org/trunk@21978 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 19:16:53 +00:00
Ryan Boren 44cb6ddc16 Don't add empty _wp_attached_file, _wp_attachment_metadata, _thumbnail_id meta to posts. Delete these fields when set to empty. Props SergeyBiryukov, Caspie. fixes #16391
git-svn-id: https://develop.svn.wordpress.org/trunk@21967 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 13:07:34 +00:00
bumpbot 327697fc6d Compress scripts/styles: 3.5-alpha-21964. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21964 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 03:24:33 +00:00
Andrew Ozz 13148ff6ce DFW: add scroll locking to prevent scrolling to top in WebKit on paste, add auto-resize throttling to 0.5 sec, only compare scrollHeight values (works well in all supported browsers), fixes #21979
git-svn-id: https://develop.svn.wordpress.org/trunk@21963 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 03:08:31 +00:00
Daryl Koopersmith 1032d728f9 Improve documentation for wp.mce.view.add(). Store view id in view options. see #21812.
git-svn-id: https://develop.svn.wordpress.org/trunk@21962 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 02:18:15 +00:00
Daryl Koopersmith 0a0732f9ab Makes custom TinyMCE views easier to implement.
For details and examples, see the ticket.

props azaozz, fixes #21812.


git-svn-id: https://develop.svn.wordpress.org/trunk@21961 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 00:13:18 +00:00
bumpbot 581321a20c Compress scripts/styles: 3.5-alpha-21960.
git-svn-id: https://develop.svn.wordpress.org/trunk@21960 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 22:58:43 +00:00
Andrew Nacin 145a09b48a XML-RPC: Accept 'url', not 'website' in wp.editProfile. props maxcutler. see #18428.
git-svn-id: https://develop.svn.wordpress.org/trunk@21959 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 19:36:17 +00:00
Andrew Nacin 9a0935e055 jQuery 1.8.2. props ocean90, fixes #21957.
git-svn-id: https://develop.svn.wordpress.org/trunk@21958 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 18:53:44 +00:00
Andrew Nacin abf7a0f360 Check a post type's show_in_admin_bar property for 'View' and 'Edit' object links. Previously show_in_admin_bar was only checked for the add new menu. fixes #20504.
git-svn-id: https://develop.svn.wordpress.org/trunk@21957 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 18:39:03 +00:00
Andrew Nacin a8aba36255 Use $gmt_time rather than $local_time in cron, since it uses GMT/UTC and not a local timestamp. see #14391.
git-svn-id: https://develop.svn.wordpress.org/trunk@21954 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 16:57:21 +00:00
Andrew Nacin 3f051e73ef Properly indent after [21952]. see #11399.
git-svn-id: https://develop.svn.wordpress.org/trunk@21953 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-22 16:21:06 +00:00
Andrew Nacin b7198b85f8 Stop cleaning the cache of a post's children. Ancestors are no longer cached against the post object, which means this kind of walking is unnecessary. It is also prohibitively expensive with large hierarchies.
We need to remove post_ancestors non-persistent caching for this. get_post_ancestors() can simply rely on the caching of get_post() instead. Previously, it was a direct query, hence the extra layers of caching and clearing.

Child cache clearing stays in wp_delete_post() as children get a new parent.

fixes #11399.



git-svn-id: https://develop.svn.wordpress.org/trunk@21952 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-22 15:55:02 +00:00
Andrew Nacin 6c3655ce31 Don't repeatedly call get_object_taxonomies() in clean_object_term_cache(). see #11399.
git-svn-id: https://develop.svn.wordpress.org/trunk@21951 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-22 15:21:30 +00:00
bumpbot aa36dd57fe Compress scripts/styles: 3.5-alpha-21950.
git-svn-id: https://develop.svn.wordpress.org/trunk@21950 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-22 15:03:04 +00:00
Andrew Nacin 991be145a9 Use the regular post type UI for editing single media items (attachments).
* Attachments now go through post.php, edit_post(), the like, and have show_ui set to true.
 * Taxonomies attached to the media library now appear in the admin menu (if show_ui).
 * Editing, cropping, uploading, etc. is still very rough, but mostly functional.

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

props helenyhou, ocean90. see #21391.



git-svn-id: https://develop.svn.wordpress.org/trunk@21948 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 22:52:54 +00:00
Andrew Nacin 2e6cb465b2 Call clean_post_cache() in wp_insert_post() after the manual query to change GUID. Remove the second call to clean_post_cache() previously done on the save_post hook. see #11399.
git-svn-id: https://develop.svn.wordpress.org/trunk@21943 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 18:52:15 +00:00
Andrew Nacin 35688ccb89 Have wp_publish_post() wrap wp_insert_post() directly. see #11399.
git-svn-id: https://develop.svn.wordpress.org/trunk@21942 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 18:49:45 +00:00
Ryan Boren ad535df32e Allow remove_cap() to unset a negative capability. Props johnjamesjacoby. fixes #21786
git-svn-id: https://develop.svn.wordpress.org/trunk@21940 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 13:41:43 +00:00
Ryan Boren 2c8fd31155 Pass a term object to the delete_term actions. Props bigdawggi. fixes #20645
git-svn-id: https://develop.svn.wordpress.org/trunk@21939 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 13:27:56 +00:00
Ryan Boren 665cf6ec69 Update comment_parent in wp_update_comment(). Props JustinSainton. fixes #21706
git-svn-id: https://develop.svn.wordpress.org/trunk@21938 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 12:57:26 +00:00
Ryan Boren 0012dd0e73 Honor https in home option.
fixes #20759


git-svn-id: https://develop.svn.wordpress.org/trunk@21937 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 12:36:50 +00:00
Peter Westwood 0da6a9dfa2 XMLRPC: Support searching via wp.getPosts() fixes #21623 props ericmann.
git-svn-id: https://develop.svn.wordpress.org/trunk@21936 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 10:18:32 +00:00
Peter Westwood cd0eabd965 Widgets: Add support for display the post date in the Recent Posts widget. Fixes #21064 props lancewillett and SergeyBiryukov.
git-svn-id: https://develop.svn.wordpress.org/trunk@21935 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 10:05:54 +00:00