Commit Graph

10618 Commits

Author SHA1 Message Date
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 a664c2d080 Avoid Strict Standards warnings. Props markoheijnen. see #6821
git-svn-id: https://develop.svn.wordpress.org/trunk@22119 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 21:59:36 +00:00
Ryan Boren 7ba5099795 Objects no longer need to be explicitly passed by ref to call_user_func*() to be callable. Props wonderboymusic. fixes #21865
git-svn-id: https://develop.svn.wordpress.org/trunk@22118 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 20:00:16 +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 ee29ba510f Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865
git-svn-id: https://develop.svn.wordpress.org/trunk@22116 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 18:30:57 +00:00
Ryan Boren d6f78d6554 Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865
git-svn-id: https://develop.svn.wordpress.org/trunk@22115 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 18:26:25 +00:00
Ryan Boren e22b981706 Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865
git-svn-id: https://develop.svn.wordpress.org/trunk@22114 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 18:21:47 +00:00
Ryan Boren 71d196340b Avoid 'Only variables should be assigned by reference' warning. Props knutsp. fixes #22013
git-svn-id: https://develop.svn.wordpress.org/trunk@22113 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 18:09:30 +00:00
Ryan Boren e6c6bcd740 Update phpdoc and deprecation for wp_cache_reset(). see #21434
git-svn-id: https://develop.svn.wordpress.org/trunk@22111 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 15:32:55 +00:00
Ryan Boren 980fd4fc3d If wp_cache_incr() is not available fallback to get()/set(). fixes #22024
git-svn-id: https://develop.svn.wordpress.org/trunk@22110 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 13:25:58 +00:00
Ryan Boren ca14391917 An empty taxonomy query should return no results rather than all posts. Props wonderboymusic. fixes #20604
git-svn-id: https://develop.svn.wordpress.org/trunk@22109 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 13:16:47 +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 1d1c3e27ce Add no-customize-support to the body classes when the toolbar is showing. Allows for 'Customize' to be hidden when JS is disabled. props obenland, DrewAPicture. fixes #20896.
git-svn-id: https://develop.svn.wordpress.org/trunk@22107 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-03 20:54:54 +00:00
Andrew Nacin cce2ddd29c Pass the current blog id to is_main_site() in wp_upload_dir(), because is_main_site() without arguments does not respond correctly on switch. see #19235.
git-svn-id: https://develop.svn.wordpress.org/trunk@22106 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-03 18:57:36 +00:00
Andrew Nacin 41399495ae Bump. Remove hyphen from beta1 as it is not our typical format. Also, bumpbot gets confused.
git-svn-id: https://develop.svn.wordpress.org/trunk@22104 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-03 16:31:03 +00:00
Ryan Boren 381583c21f Improve performance of WP_Meta_Query when doing OR queries on meta keys. Props joehoyle, SergeyBiryukov. fixes #19729
git-svn-id: https://develop.svn.wordpress.org/trunk@22103 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-03 12:35:06 +00:00
Daryl Koopersmith 183e49c4c3 MCE Views: Use default shortcode properties when the shortcode parameter is set.
Prevents devs from having to manually extend the default shortcode property object.

see #21390, #21812.


git-svn-id: https://develop.svn.wordpress.org/trunk@22102 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-03 06:40:07 +00:00
Daryl Koopersmith 866ffeb1d5 Allow galleries to be reordered by drag and drop.
An `Attachments` view now accepts a `sortable` property. Manual sorting is only enabled when the corresponding collection doesn't have a comparator.

jQuery UI sortable must be enqueued for sorting to work.

see #21390, #21809.


git-svn-id: https://develop.svn.wordpress.org/trunk@22101 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-03 04:21:50 +00:00
Daryl Koopersmith 29c4387b7d Update underscore.js to version 1.4.1. fixes #22081, see #22026.
git-svn-id: https://develop.svn.wordpress.org/trunk@22100 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-03 00:27:16 +00:00
Andrew Nacin 52d0e40010 Don't declare the argument as optional for WP_Image_Editor_Imagick::supports_mime_type(), avoiding an error with inheritance. props SergeyBiryukov, fixes #22073.
git-svn-id: https://develop.svn.wordpress.org/trunk@22098 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-02 03:33:07 +00:00
Andrew Nacin 7f2ab732c4 Do not modify the post object in get_adjacent_post_rel_link(). Prior to 3.5 this could have poisioned the post's cache. props mdawaffe, fixes #22072.
git-svn-id: https://develop.svn.wordpress.org/trunk@22095 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 21:56:20 +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 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 03a9059cdc Restore the behavior of the 'all' status for comment queries. Props SergeyBiryukov. see #21101
git-svn-id: https://develop.svn.wordpress.org/trunk@22090 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 15:31:40 +00:00
Ryan Boren 51905ec6c7 Revert stowaway in [22087]
git-svn-id: https://develop.svn.wordpress.org/trunk@22088 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 14:26:45 +00:00
Ryan Boren b15d893ed8 Reinit roles and the current user after switching the cache to the new blog in switch_to_blog() and restore_current_blog(). Props joostdekeijzer. fixes #21459
git-svn-id: https://develop.svn.wordpress.org/trunk@22087 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 14:25:31 +00:00
Ryan Boren 6248f81649 Add @since to wp_cache_switch_to_blog(). Props SergeyBiryukov. fixes #21434
git-svn-id: https://develop.svn.wordpress.org/trunk@22086 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-30 14:02:59 +00:00
Dion Hulse 693fccb99c Silence a PHP Warning in Safe Mode from get_temp_dir(). Props ocean90. Fixes #20778
git-svn-id: https://develop.svn.wordpress.org/trunk@22082 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-29 01:22:25 +00:00
Ryan Boren 67f3ab27b0 Invalidate the WP_Comment_Query:query() cache when comments are added. Switch last_changed to a counter incremented via wp_cache_incr().
fixes #22024


git-svn-id: https://develop.svn.wordpress.org/trunk@22080 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-28 12:47:31 +00:00
Ryan Boren 1500b5a097 Remove debug cruft. Props duck_. fixes #21003
git-svn-id: https://develop.svn.wordpress.org/trunk@22079 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-28 12:31:39 +00:00
Andrew Ozz d56d67a1e0 Fix typo in wp-pointer.css, props TobiasBg, fixes #21019
git-svn-id: https://develop.svn.wordpress.org/trunk@22078 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-28 00:38:07 +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 2722e212aa Update underscore.js to version 1.4.0. fixes #22026.
git-svn-id: https://develop.svn.wordpress.org/trunk@22076 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 23:38:47 +00:00
Andrew Nacin d74a509915 3.5 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@22075 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 22:25:05 +00:00
Ryan Boren 6aabc90333 Support meta queries in WP_Comment_Query.
Props nikolov.tmw
fixes #21003


git-svn-id: https://develop.svn.wordpress.org/trunk@22074 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 21:53:14 +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
bumpbot b4322b3a60 Compress scripts/styles: 3.5-alpha-22071.
git-svn-id: https://develop.svn.wordpress.org/trunk@22071 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 19:21:47 +00:00
Andrew Nacin dee18a07f9 Fix option name. props ocean90, see #21719.
git-svn-id: https://develop.svn.wordpress.org/trunk@22070 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 19:19:18 +00:00
Ryan Boren e9a843c11c Allow get_comments() to query for explicit value of comment_approved.
Props dd32, nbachiyski
fixes #21101


git-svn-id: https://develop.svn.wordpress.org/trunk@22068 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 18:08:02 +00:00
Ryan Boren 1ee0534f98 Add domain_exists filter. Props jamescollins. fixes #21142
git-svn-id: https://develop.svn.wordpress.org/trunk@22065 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 17:30:34 +00:00
Ryan Boren 48484428a2 Introduce create_posts meta capability. Props scribu, nacin, casben79. see #16714
git-svn-id: https://develop.svn.wordpress.org/trunk@22060 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 15:33:19 +00:00
Ryan Boren 9d798e26d4 Add publish_post meta cap. Props nacin. fixes #21288
git-svn-id: https://develop.svn.wordpress.org/trunk@22056 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 12:48:59 +00:00
Dion Hulse a9f469870d Avoid a warning in wp_remote_post() when using arrays or objects in the body param by using a more verbose check, introduced with [22047]. See #14184
git-svn-id: https://develop.svn.wordpress.org/trunk@22055 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 10:09:43 +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 7354809132 Add quick insert buttons to attachment views in the library and remove buttons to attachment views in the gallery editor. see #21390, #21809.
git-svn-id: https://develop.svn.wordpress.org/trunk@22053 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 07:45:26 +00:00
Dion Hulse 93ba84c528 Allow wp_remote_post to send a body consisting of entirely '0', which may be used when PUT'ing or POST'ing data to a API which accepts a raw chunk of data rather than key=value pairs (Such as some REST API's). Fixes #14184
git-svn-id: https://develop.svn.wordpress.org/trunk@22047 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 06:54:17 +00:00
Daryl Koopersmith 22b3981229 Media JS: Use a custom Attachment views for both the media library and gallery screens.
To do so, the Attachment view code had to be shifted above the Workspace view code to ensure the subview is defined (preventing errors).

Also corrects an error in `wp.media.view.Attachments.add` where it was still using the default Attachment view.

see #21390, #21809.


git-svn-id: https://develop.svn.wordpress.org/trunk@22046 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 06:53:54 +00:00
Daryl Koopersmith 3324270681 Media JS: Give the master Workspace view control over which Attachment view it uses. see #21390, #21807, #21809.
git-svn-id: https://develop.svn.wordpress.org/trunk@22045 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 06:39:12 +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
Daryl Koopersmith d2b6d050f4 Use the attachment id to look up the mime type icon instead of the raw mime type string, as wp_mime_type_icon() runs a broader search when using an id. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22043 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 06:07:56 +00:00
Mark Jaquith 52801db5fc Make Multisite work when WordPress is installed in a subdirectory. You can now have WordPress Multisite as an SVN external or a Git submodule! props johnjamesjacoby, evansolomon, duck_, jakemgold, nacin, markjaquith. see #19796
git-svn-id: https://develop.svn.wordpress.org/trunk@22042 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 06:07:21 +00:00
Daryl Koopersmith 424f5b21e6 When uploading files through the Plupload bridge, attempt to detect images on upload. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22041 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 05:52:42 +00:00
Daryl Koopersmith c6b63ec34d Automatically add any uploading media files to the group of selected files.
This also automatically adds any files uploaded on the gallery screen to that gallery.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22040 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 05:28:37 +00:00
Andrew Nacin 53cbfca362 If a pre-3.0 (MU era) network disables ms-files manually, they don't need /sites/ in their wp-content/uploads directory. see #19235.
git-svn-id: https://develop.svn.wordpress.org/trunk@22038 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 04:56:58 +00:00
Andrew Nacin c7d5ae4bed XML-RPC: Introduce wp.getRevisions and wp.restoreRevision.
props brandondove, koke, markoheijnen, JustinSainton, maxcutler.

fixes #21397.



git-svn-id: https://develop.svn.wordpress.org/trunk@22037 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 04:17:15 +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 8ba137b739 XML-RPC: Add an if_not_modified_since argument to wp.editPost.
Accepts a GMT date, which is used to compare to the current post_modified_gmt
value for the post being edited. If the post has since been edited (as in, too
old of a date was passed), the edit is rejected as overwriting a newer version.

It is rejected with a HTTP 409 Conflict status code. (Fancy.)

props koke, markoheinjen.
Tests: [UT1049]

see #21397.



git-svn-id: https://develop.svn.wordpress.org/trunk@22034 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 03:39:40 +00:00
Andrew Ozz 47b31ecf22 Fix image button in DFW, props ocean90, see #21019
git-svn-id: https://develop.svn.wordpress.org/trunk@22032 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 02:17:04 +00:00
Andrew Ozz 421a70cb77 Consolidated patch for retina support, props taylorde, props empireoflight, fixes #21019
git-svn-id: https://develop.svn.wordpress.org/trunk@22031 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 02:12:54 +00:00
Andrew Nacin 4e9d8d363e New color picker, props mattwiebe. see #21206.
Replaces Farbtastic. May change further in response to user testing.



git-svn-id: https://develop.svn.wordpress.org/trunk@22030 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 01:57:38 +00:00
Daryl Koopersmith 2fea9cef7e Apply localized strings to media modal. see #21390, #21808.
git-svn-id: https://develop.svn.wordpress.org/trunk@22029 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 01:11:04 +00:00
Daryl Koopersmith 419a03862e Media JS: Improve UX for which buttons show when inserting media into a post.
'Insert into post' is the primary action when either one item is selected, or any number of non-image items are selected. If multiple images are selected, 'Insert into post' becomes secondary, and 'Create a new gallery' takes the primary spot.

Adds a method to `get` Button views from the Toolbar. Adds a model for certain button attributes to allow size, style, and text to be easily changed.

see #21390, #21808, #21809.


git-svn-id: https://develop.svn.wordpress.org/trunk@22027 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 00:59:04 +00:00
Andrew Ozz 8b575394a5 Fix background on split buttons, remove redundant !important, remove spacers, a little css cleanup, see #18141
git-svn-id: https://develop.svn.wordpress.org/trunk@22025 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 00:41:49 +00:00
bumpbot 04889ca5f0 Compress scripts/styles: 3.5-alpha-22024.
git-svn-id: https://develop.svn.wordpress.org/trunk@22024 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 22:58:46 +00:00
Daryl Koopersmith fd3a6616c0 Remove internal TinyMCE attributes when generating the HTML for attachment views.
Moves the HTML utility functions to the top of `mce-views.js`. Also adds `wp.mce.view.removeInternalAttrs( attrs )` and `wp.mce.view.attrs( content )`.

see #21390, #21812, #21813.


git-svn-id: https://develop.svn.wordpress.org/trunk@22023 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-26 22:20:15 +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
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