Commit Graph

10899 Commits

Author SHA1 Message Date
Andrew Ozz 7d5de0703a TinuMCE: update to 3.5.7, fixes #21173
git-svn-id: https://develop.svn.wordpress.org/trunk@22550 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-12 21:20:46 +00:00
Andrew Nacin 4bbe50bf7d Revert [22421]. see #6821. see #22308. see #22419.
git-svn-id: https://develop.svn.wordpress.org/trunk@22549 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-12 07:47:41 +00:00
Daryl Koopersmith c2bef6792f Media: Allow successive embed URLs. see [22547], #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22548 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-12 06:02:03 +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
bumpbot ac3a589c8d Compress scripts/styles: 3.5-beta2-22546.
git-svn-id: https://develop.svn.wordpress.org/trunk@22546 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-11 22:58:32 +00:00
Andrew Nacin 0c23ef3cf0 In switch_theme(), make sure there are no residual template_root or stylesheet_root options remaining if there is only one theme root registered. see #22252.
git-svn-id: https://develop.svn.wordpress.org/trunk@22545 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-11 21:51:27 +00:00
Andrew Nacin 7216663b0b Ensure $_wp_default_headers is set before iterating over it in get_custom_header(). props jeffsebring. fixes #22221.
git-svn-id: https://develop.svn.wordpress.org/trunk@22544 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-11 19:11:27 +00:00
Daryl Koopersmith 9cd3c458c7 Media: Ensure variables in the attachment details template have defined defaults.
* Adds styling to the upload progress bar in the attachment details template.
* Defines the `filename` attribute when Plupload creates the client-side `Attachment` model.

fixes #22410, see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22543 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-11 05:16:41 +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
bumpbot 9c7e947d79 Compress scripts/styles: 3.5-beta2-22540.
git-svn-id: https://develop.svn.wordpress.org/trunk@22540 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 22:58:34 +00:00
Daryl Koopersmith 747016b9d5 Media templates: Alter escaping regular expression to prevent it from aggresively consuming input meant for interpolation. see #22344, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22539 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 21:38:14 +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 5096f387d1 Media: Add custom URL as an option to attachment display properties. see #21390, #22206.
git-svn-id: https://develop.svn.wordpress.org/trunk@22537 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 20:36:46 +00:00
Daryl Koopersmith 307427162b Media: Automatically strip any non-image items from the collection when creating a gallery.
Also changes the rules for when the "new gallery" button shows:
* More than two items must be selected.
* At least one of them must be an image.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22535 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 19:25:39 +00:00
Daryl Koopersmith 19488d75ce Media: Allow the modal sidebar to scroll. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22534 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 19:10:04 +00:00
Daryl Koopersmith 2d3c2c4d84 Media: Watch additional search events. Properly captures clearing the search box. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22533 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 18:56:11 +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
Andrew Nacin ee5bc76549 Add comments to time intervals we cannot express with the constants. Fix a comment. props SergeyBiryukov. fixes #20987.
git-svn-id: https://develop.svn.wordpress.org/trunk@22531 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 18:13:09 +00:00
Daryl Koopersmith 8af2f4674f Media: Account for a race condition when deleting an edit gallery frame. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22530 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 09:57:28 +00:00
Daryl Koopersmith fefaea2cf1 Media: Add instructions to drag and drop to reorder images on gallery and batch edit pages.
Removes search boxes from these pages as well.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22529 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 09:11:33 +00:00
Andrew Nacin e6fcf3b013 Don't unnecessarily translate media upload tab strings. see #22186.
git-svn-id: https://develop.svn.wordpress.org/trunk@22524 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 07:56:17 +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 331bcde9c2 Update the JS version of the shortcode regex to match [22382]. props SergeyBiryukov. fixes #17657.
git-svn-id: https://develop.svn.wordpress.org/trunk@22522 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 07:23:55 +00:00
Andrew Nacin 020e87658b Customizer uploader control: Pass arrays of extensions around instead. see #22149.
git-svn-id: https://develop.svn.wordpress.org/trunk@22519 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 04:59:46 +00:00
Daryl Koopersmith f8002c7752 Media: Relocate localization to wp_enqueue_media(). see #22186, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22516 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 00:37:13 +00:00
bumpbot 68f1c2fd82 Compress scripts/styles: 3.5-beta2-22515.
git-svn-id: https://develop.svn.wordpress.org/trunk@22515 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 22:58:35 +00:00
Andrew Nacin 595cd943bf WordPress dialog jQuery UI widget:
* Link to the upstream bug report.
 * No need to specify the default value for an option.
 * Use the new _super() UI method to open the dialog, avoiding a direct reference to the parent.
 * Fix typo in comment.
 * Use public isOpen() method rather than a private property.

props scott.gonzalez.
fixes #22399.



git-svn-id: https://develop.svn.wordpress.org/trunk@22514 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 22:36:35 +00:00
Andrew Nacin e625c90923 Define a custom event prefix in the wpdialog jQuery UI widget to work around a jQuery UI 1.9.1 regression. see #22399.
git-svn-id: https://develop.svn.wordpress.org/trunk@22513 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 21:45:13 +00:00
Jon Cave bc936748c3 Minor WP_Image_Editor documentation fixes. See #6821.
git-svn-id: https://develop.svn.wordpress.org/trunk@22511 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 20:10:33 +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 80d6ef3b28 Media JS: Pass the region instance through when firing the activate and deactivate events. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22509 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 12:43:39 +00:00
Daryl Koopersmith 68b5140382 Media: Keep track of gallery display properties in a separate model instead of mixed in with the query parameters. This allows for arbitrary gallery arguments and a more flexible data structure. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22508 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 12:37:21 +00:00
Daryl Koopersmith 199edff3b4 Media: When printing a gallery shortcode, hide the implicit orderby value. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22507 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 12:14:48 +00:00
Daryl Koopersmith cc58e827f3 Media: Correctly set the edit gallery's library. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22506 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 12:09:15 +00:00
Daryl Koopersmith 9c1f2e577a Integrate media with the custom background page. fixes #21818, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22502 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 11:37:24 +00:00
Daryl Koopersmith a72459a5f5 Media JS: Only block button events by default if the button does not link to anything. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22501 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 11:30:40 +00:00
Daryl Koopersmith 2fcc122d9c Media: Output correct link html when inserting attachments. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22499 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 10:48:50 +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 63dd1ca518 Media JS: Use basic upload/library by default.
`wp.media` now recognizes the `frame` attribute (currently a string; either'select' or 'post') and defaults to using a basic select frame. It also checks for the existence of classes in a safer fashion, as it does not assume the `MediaFrame` property exists.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22495 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 09:59:36 +00:00
Daryl Koopersmith 1401ee7928 Media: Add a basic starting frame for upload/library selection.
`media.view.MediaFrame.Select` is a frame class with a handful of sensible defaults to handle selecting and uploading items in the media library.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22494 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 09:47:12 +00:00
Daryl Koopersmith b06d75f58b Media: Add size dropdown to attachment display settings in the media modal. fixes #22206, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22493 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 06:15:25 +00:00
Daryl Koopersmith 3da7fa8d1e Customizer: Restrict image control uploaders to only allow image file types. see #22149.
git-svn-id: https://develop.svn.wordpress.org/trunk@22492 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 05:47:02 +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 97490d8911 Allow wp_plupload_default_settings() to be called multiple times without doubling up the output. see #22060.
git-svn-id: https://develop.svn.wordpress.org/trunk@22488 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 04:51:25 +00:00
Daryl Koopersmith bb3dccd180 Media: Ensure search box reflects actual search state.
* Also switches search box to use `<input type="search" />` to take advantage of browser UI to clear the field.

fixes #22315, see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22487 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 04:44:31 +00:00
Andrew Nacin eecbac5ca5 Consult the queried object for the post type. props mdgl, MikeHansenMe, wonderboymusic. fixes #21648.
git-svn-id: https://develop.svn.wordpress.org/trunk@22483 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 02:48:15 +00:00
Daryl Koopersmith 1692eb9b95 Media: In the main media library in the insert media dialog, only show attachment display settings when one attachment is selected. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22482 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 02:11:37 +00:00
Andrew Nacin 21f4690f30 Final HiDPI tweaks. Don't use rss-2x.png on a front-end widget. Improve selectors for favicons in the toolbar to avoid breaking existing images. Remove unnecessary RTL styles. FIXES #21019.
git-svn-id: https://develop.svn.wordpress.org/trunk@22481 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 02:06:59 +00:00
Daryl Koopersmith b9a5374e64 Media: Add batch insertion workflow. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22480 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 01:44:02 +00:00
Daryl Koopersmith df931d747d Media JS: Use correct variable name when binding to the `change:library` event. see [22477], #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22478 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 01:24:55 +00:00
Daryl Koopersmith 8f79cdaea4 Media JS: Add JIT composite library creation/destruction to states to allow for dynamically excluded Attachment models. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22477 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 01:23:20 +00:00
Andrew Nacin fb1ce7ae11 Use correct variable. props picklewagon. fixes #22394.
git-svn-id: https://develop.svn.wordpress.org/trunk@22476 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 00:16:30 +00:00
bumpbot 08a5af03ed Compress scripts/styles: 3.5-beta2-22475.
git-svn-id: https://develop.svn.wordpress.org/trunk@22475 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 22:58:34 +00:00
Andrew Nacin 0758d4e647 Return nothing in get_adjacent_post() when $in_same_cat = true but the post doesn't support (or otherwise have) categories. Avoids SQL error. props batmoo, SergeyBiryukov. fixes #15959.
git-svn-id: https://develop.svn.wordpress.org/trunk@22472 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 21:16:15 +00:00
Andrew Nacin 9c33c30f5b Account for unfiltered_upload cap in wp_upload_bits(). see #21292.
git-svn-id: https://develop.svn.wordpress.org/trunk@22471 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 20:41:34 +00:00
Ryan Boren bcae1712c1 Add SimplePie/Exception.php.
Props ocean90
fixes #22321


git-svn-id: https://develop.svn.wordpress.org/trunk@22469 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 19:14:53 +00:00
Daryl Koopersmith cf75c68b55 Media JS: Add media.model.Composite, to aid in the representation of joint views. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22467 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 15:32:40 +00:00
Daryl Koopersmith 68d143d20d Media: Improve sidebar handling and make attachment display properties attachment-specific.
`wp.mce.media`
* Watch all workflows for the `insert` event and attempt to insert the current state's `selection` if it exists.
* Fetch and pass attachment display properties through to `wp.media.string.image()`.

`wp.media.controller.Region`
* Separate the concept of events and modes.
* All events triggered on a `Region` trigger both `event` and `event:mode` callbacks.
* When a mode is deactivated, `deactivate` and `deactivate:mode` events are fired.
* When a mode is activated, `activate` and `activate:mode` events are fired.

`wp.media.controller.Library`
* Remove the `details()`, `buildDetails()`, and `clearDetails()` methods that juggled sidebar views. Instead, handle the sidebar views using modes.

`wp.media.controller.Gallery`
* Shift the overloaded `sidebar()` method to use modes.

`wp.media.view.MediaFrame.Post`
* Declare `activate:mode` event bindings using an nested object to reduce repetition.
* Update sidebar activation callbacks.

`wp.media.view.Settings`
* Refactor to leverage HTML data attributes and implicit values (instead of setting the fallback whenever an object was created). This has the additional benefit that gallery shortcode parameters are not output when the user has left them set to the default.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22466 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 14:15:09 +00:00
Ryan Boren 8b4612f97a If $this->posts is empty, don't do stuff to it.
Props wonderboymusic
fixes #22061


git-svn-id: https://develop.svn.wordpress.org/trunk@22465 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 13:52:40 +00:00
Andrew Nacin 6f8681b02d Revert [22445]. see #20376. fixes #22389.
git-svn-id: https://develop.svn.wordpress.org/trunk@22464 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 03:30:56 +00:00
Andrew Nacin 5395736356 In WP_Image_Editor / wp_load_image(), use is_file() rather than file_exists() so we do not accidentally load a directory.
props benkulbertis, DH-Shredder, scribu.
fixes #17814.



git-svn-id: https://develop.svn.wordpress.org/trunk@22463 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 02:02:03 +00:00
Andrew Nacin b7e9155e33 Fix the matching in is_email_address_unsafe(), which was too aggressive.
We should only check to see if the user's email address has the same
domain as or is a subdomain of any banned email domain.

Add a filter.

props mdawaffe.
fixes #21570.



git-svn-id: https://develop.svn.wordpress.org/trunk@22461 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-08 01:06:17 +00:00
bumpbot 6b78173371 Compress scripts/styles: 3.5-beta2-22455.
git-svn-id: https://develop.svn.wordpress.org/trunk@22456 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 22:58:33 +00:00
Daryl Koopersmith 9dc03c5c29 Media: Improve memory management of views, events, and DOM nodes. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22454 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 22:43:16 +00:00
Andrew Nacin 80c7908e62 Sanity checks in get_body_class() to ensure we are operating on the type of queried object that we expect. props wonderboymusic. fixes #17662.
git-svn-id: https://develop.svn.wordpress.org/trunk@22451 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 22:12:44 +00:00
Andrew Nacin a2082dcf2b Don't call get_term_by() in get_queried_object() if we have no terms. props wonderboymusic. fixes #21967.
git-svn-id: https://develop.svn.wordpress.org/trunk@22450 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 22:09:05 +00:00
Andrew Nacin 117dd15e79 Merge two strings. props pavelevap, see #22306.
git-svn-id: https://develop.svn.wordpress.org/trunk@22449 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 22:03:23 +00:00
Andrew Nacin da07593046 Ensure a method is compatible with its parent. props kurtpayne, fixes #22265.
git-svn-id: https://develop.svn.wordpress.org/trunk@22448 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 21:59:20 +00:00
Andrew Nacin d9bab22085 Fix meta value querying in wp_list_pages(). props SergeyBiryukov. fixes #20376.
git-svn-id: https://develop.svn.wordpress.org/trunk@22445 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 21:48:38 +00:00
Andrew Nacin dea9cf01ce Update the old wp-app.php rule to allow for a trailing slash followed by endpoint data. props wonderboymusic. fixes #22035.
git-svn-id: https://develop.svn.wordpress.org/trunk@22441 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 21:27:02 +00:00
Andrew Nacin 30df4b2aa0 Allow the .hidden class to hide a button. props helenyhou. fixes #22018.
git-svn-id: https://develop.svn.wordpress.org/trunk@22440 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 21:25:25 +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
bumpbot 7ec25963e0 Compress scripts/styles: 3.5-beta2-22438. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@22438 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 20:29:58 +00:00
Daryl Koopersmith b636e94e47 Media: Integrate the gallery workflow with the media menu.
`wp.media.model.Query.more()`
* If a request has already been sent out for more attachments, return that request object instead of creating another.

`wp.media.controller.Region`
* A region allows views to be swapped in and out of a section of the page without either view having to know about the other.
* Application components can use the same callbacks and resources by leveraging `Region.mode()`, which triggers a set of callbacks to create or transform the current view, but only if necessary.

`wp.media.view.Frame`
* Leverage `Region` controllers instead of forcing states to swap view objects, which causes states to fit more comfortably in the controller-camp.
* Add `previous()`, a method to fetch the previous state `id`.
* Separate out the default settings over several objects (so blank frames can be instantiated).

`wp.media.view.MediaFrame`
* The base `Frame` used for media management: handles integration with the `Modal` and `UploaderWindow` views.

`wp.media.view.MediaFrame.Post`
* Includes all default media states and callbacks necessary for inserting media into a post.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22437 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 20:14:41 +00:00
Andrew Nacin df6d81af5b Allow get_custom_header() to handle a default registered header that has yet to be saved to the database. fixes #22221.
git-svn-id: https://develop.svn.wordpress.org/trunk@22436 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 20:12:47 +00:00
Andrew Nacin e25ee1e3e6 Avoid an uncaught exception in get_gmt_from_date(). The return value is imperfect - date( $format, 0 ) - but better than a fatal error. props wonderboymusic. fixes #20942.
git-svn-id: https://develop.svn.wordpress.org/trunk@22435 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 20:07:41 +00:00
Ryan Boren b21172a14a Don't assign wp_the_query to wp_query by reference. Removing the ref avoids accidentally stomping wp_the_query.
Props scribu, wpmuguru
fixes #22125


git-svn-id: https://develop.svn.wordpress.org/trunk@22434 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 20:03:28 +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 c2ad4403de Don't return encoded ampersands from get_post_comments_feed_link() to avoid canonical redirect issues. Apply esc_url() when appropriate.
props markjaquith, SergeyBiryukov. fixes #21841.



git-svn-id: https://develop.svn.wordpress.org/trunk@22431 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 19:56:10 +00:00
Andrew Nacin 496ae7b83f Merge some strings. props pavelevap. fixes #22306.
git-svn-id: https://develop.svn.wordpress.org/trunk@22430 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 19:37:54 +00:00
Andrew Nacin a7097f60d5 Enforce a minimum of two arguments for wpdb::prepare(). The first argument is the query (or fragment thereof), which is required. Additional arguments are values to substitute into placeholders.
This will generate E_WARNINGs for insufficient arguments when prepare() is called with no additional arguments. This should discourage improper uses of prepare() under the guise of safely running a query.

props xknown. fixes #22262.



git-svn-id: https://develop.svn.wordpress.org/trunk@22429 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 19:30:59 +00:00
Andrew Nacin d34180efc2 Remove single-argument calls to wpdb:prepare(), which are invalid as nothing is being prepared. see #22262.
git-svn-id: https://develop.svn.wordpress.org/trunk@22428 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 19:28:08 +00:00
Andrew Nacin 6e69cc9798 Display links if no link categories exist. props MikeHansenMe. fixes #22216.
git-svn-id: https://develop.svn.wordpress.org/trunk@22426 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 19:25:18 +00:00
Mark Jaquith 504b94b1b3 Use ImageOptim to losslessly smush our images. About half a MB in savings! fixes #22381. props waldojaquith
git-svn-id: https://develop.svn.wordpress.org/trunk@22425 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 18:49:10 +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
Ryan Boren 08a2d93b7c Call Imagick::queryformats() non-statically to preserve back compat with older versions of Imagick.
Props mpvanwinkle77
fixes #22308
see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22421 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 17:50:38 +00:00
Andrew Nacin 7cd087d4b2 Properly return new WP_Error objects. props bpetty. see #6812.
git-svn-id: https://develop.svn.wordpress.org/trunk@22420 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 17:49:00 +00:00
Ryan Boren 62b6474e77 When using WP_User::set_role() to set the role, don't unset all caps when the requested role matches the current role.
Props scribu, jammitch
fixes #18932


git-svn-id: https://develop.svn.wordpress.org/trunk@22418 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 17:16:37 +00:00
Andrew Nacin e23582cd09 Treat a single taxonomy passed as an array the same as when passed as a string in get_terms(). props wonderboymusic, fixes #17955.
git-svn-id: https://develop.svn.wordpress.org/trunk@22417 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 09:03:40 +00:00
Andrew Nacin f9abbced91 Use correct variable name in code comment. props SergeyBiryukov, fixes #21962.
git-svn-id: https://develop.svn.wordpress.org/trunk@22416 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 08:57:49 +00:00
Daryl Koopersmith c0ab768faa Use Mustache-insipired template tags.
Underscore's default ERB-style templates are incompatible with PHP when asp_tags is enabled. As a result, we've settled on an alternative syntax that should be familiar to devs: Mustache-inspired for interpolating and escaping content, and ERB-inspired for execution.

	`{{{a}}}` - interpolating
	`{{ a }}` - escaping
	`<# a #>` - execution

props rmccue. fixes #22344, see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22415 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 08:41:17 +00:00
Andrew Nacin ba7fb93e4e Check for WP_Error in get_the_category(). props batmoo. fixes #21155.
git-svn-id: https://develop.svn.wordpress.org/trunk@22412 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 23:47:14 +00:00
Andrew Ozz 49d5e725ce Allow commonly used obsolete HTML5 attributes in TinyMCE, table[summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor] and a[name], fixes #22175
git-svn-id: https://develop.svn.wordpress.org/trunk@22411 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 23:36:10 +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
bumpbot 75201ce1e5 Compress scripts/styles: 3.5-beta2-22407.
git-svn-id: https://develop.svn.wordpress.org/trunk@22407 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 22:58:35 +00:00
Andrew Nacin 9f4d6a2ebe Don't show a hand cursor when hovering over a disabled button. props sabreuse, fixes #22371.
git-svn-id: https://develop.svn.wordpress.org/trunk@22405 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 22:30:41 +00:00
Ryan Boren ba7dbbe78d Revert [22365]. see #21167
git-svn-id: https://develop.svn.wordpress.org/trunk@22403 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 19:45:51 +00:00
Jon Cave 397efc640f Update shortcode regular expression commentary. See #17657.
git-svn-id: https://develop.svn.wordpress.org/trunk@22401 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 14:47:33 +00:00
Andrew Nacin 67ac51fe73 Keyboard accessibility for the theme customizer. props lessbloat, jorbin, JustinSainton. fixes #21283.
git-svn-id: https://develop.svn.wordpress.org/trunk@22400 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 14:47:25 +00:00
Jon Cave 452976110d Correctly associate new menu items with a menu when using wp_update_nav_menu_item()
wp_update_nav_menu_item() must pass tax_input to wp_insert_post() when creating items
otherwise the menu-item relationship isn't made.

See #22189.


git-svn-id: https://develop.svn.wordpress.org/trunk@22399 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 14:46:56 +00:00