Commit Graph

11122 Commits

Author SHA1 Message Date
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
Jon Cave 65f6490eca Actually pass old permalink structure with permalink_structure_changed action
Props doublesharp. Fixes #22351.


git-svn-id: https://develop.svn.wordpress.org/trunk@22398 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 12:41:33 +00:00
Daryl Koopersmith f70612501d Media JS: Move state-related logic from sidebar views to the state controllers. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22397 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 01:19:39 +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 Ozz 4902853127 Remove the Alt + Shift + G (old fullscreen mode) shortcut from the TinyMCE help popup, props SergeyBiryukov, see #21197
git-svn-id: https://develop.svn.wordpress.org/trunk@22394 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 00:28:01 +00:00
Andrew Ozz 99a47fb677 Fix the right border of the editor textarea, props SergeyBiryukov, fixes #21906
git-svn-id: https://develop.svn.wordpress.org/trunk@22390 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 23:55:10 +00:00
Andrew Nacin 2a9536d817 Add a $public_only argument to count_many_users_posts() and get_posts_by_author_sql(). Defaults to false, and allows the counts to be returned for only public posts. props ryan, westi. fixes #21431.
git-svn-id: https://develop.svn.wordpress.org/trunk@22386 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 23:11:25 +00:00
bumpbot 0d86cdf176 Compress scripts/styles: 3.5-beta2-22384.
git-svn-id: https://develop.svn.wordpress.org/trunk@22384 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 22:58:34 +00:00
Ryan Boren 0d977c4042 Fix field alignment in the "Insert/edit link" dialog.
Props SergeyBiryukov
fixes #22275


git-svn-id: https://develop.svn.wordpress.org/trunk@22383 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 22:42:22 +00:00
Ryan Boren 24a69e1602 Allow hyphens in shortcode names.
Props kovshenin, solarissmoke, aaroncampbell
fixes #17657


git-svn-id: https://develop.svn.wordpress.org/trunk@22382 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 22:27:36 +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
Andrew Nacin 502908fa4c Invalidate oEmbed caches on pre_post_update instead of save_post so existing metadata caches may be used. fixes #22190.
git-svn-id: https://develop.svn.wordpress.org/trunk@22369 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 16:47:04 +00:00
Ryan Boren b1eccdd12d In wp_xmlrpc_server::_insert_post(), preservea valid post status instead of overwriting it with 'draft'. This preserves the 'inherit' status of attachments. Props markoheijnen. fixes #22335
git-svn-id: https://develop.svn.wordpress.org/trunk@22368 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 14:44:25 +00:00
Ryan Boren 80653d0e73 Update SimplePie to 1.3.1. Props rmccue, ocean90. fixes #22321
git-svn-id: https://develop.svn.wordpress.org/trunk@22366 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 14:25:25 +00:00
Ryan Boren 38b29deb8e preg_quote() the permalink structure so that regex special chars such as dots are correctly handled. Props SergeyBiryukov. fixes #21167
git-svn-id: https://develop.svn.wordpress.org/trunk@22365 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 14:13:29 +00:00
Daryl Koopersmith f42b826898 Media: Show an inline uploader when the media library is empty.
Merges most of `wp.media.controller.Upload` into `wp.media.controller.Library`, so we always create an inline uploader instead of an attachments browser if the state's `library` is empty.

props rzen, fixes #22323, see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22363 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 02:43:47 +00:00
Daryl Koopersmith 737ed62a1c Streamlining media, part I.
The main goal here is to rearrange the media components in a modularized structure to support more linear workflows. This is that structure using the pre-existing workflows, which will be improved over the course of the next few commits.

This leaves a few pieces a bit rough around the edges: namely gallery editing and selecting a featured image.

The fine print follows.

----

'''Styles'''
* Tightened padding around the modal to optimize for a smaller default screen size.
* Added a light dashed line surrounding the modal to provide a subtle cue for the persistent dropzone (which is evolving into a power user feature since we now have a dedicated `upload` state).
* Add a size for `hero` buttons.
* Remove transitions from frame subviews (e.g. menu, content, sidebar, toolbar).

----

'''Code'''

`wp.media.controller.StateManager`
* Don't fire `activate` and `deactivate` if attempting to switch to the current state.

`wp.media.controller.State`
* Add a base state class to bind default methods (as not all states will inherit from the `Library` state).
* On `activate`, fire `activate()`, `menu()`, `content()`, `sidebar()`, and `toolbar()`.
* The menu view is often a shared object (as its most common use case is switching between states). Assign the view to the state's `menu` attribute.
* `menu()` automatically fetches the state's `menu` attribute, attaches the menu view to the frame, and attempts to select a menu item that matches the state's `id`.

`wp.media.controller.Library`
* Now inherits from `wp.media.controller.State`.

`wp.media.controller.Upload`
* A new state to improve the upload experience.
* Displays a large dropzone when empty (a `UploaderInline` view).
* When attachments are uploaded, displays management interface (a `library` state restricted to attachments uploaded during the current session).

`wp.media.view.Frame`
* In `menu()`, `content()`, `sidebar()`, and `toolbar()`, only change the view if it differs from the current view. Also, ensure `hide-*` classes are properly removed.
*

`wp.media.view.PriorityList`
* A new container view used to sort and render child views by the `priority` property.
* Used by `wp.media.view.Sidebar` and `wp.media.view.Menu`.
* Next step: Use two instances to power `wp.media.view.Toolbar`.

`wp.media.view.Menu` and `wp.media.view.MenuItem`
* A new `PriorityList` view that renders a list of views used to switch between states.
* `MenuItem` instances have `id` attributes that are tied directly to states.
* Separators can be added as plain `Backbone.View` instances with the `separator` class.
* Supports any type of `Backbone.View`.

`media.view.Menu.Landing`
* The landing menu for the 'insert media' workflow.
* Includes an inactive link to an "Embed from URL" state.
* Next steps: only use in select cases to allot for other workflows (such as featured images).

`wp.media.view.AttachmentsBrowser`
* A container to render an `Attachments` view with accompanying UI controls (similar to what the `Attachments` view was when it contained the `$list` property).
* Currently only renders a `Search` view as a control.
* Next steps: Add optional view counts (e.g. "21 images"), upload buttons, and collection filter UI.

`wp.media.view.Attachments`
* If the `Attachments` scroll buffer is not filled with `Attachment` views, continue loading more attachments.
* Use `this.model` instead of `this.controller.state()` to allow `Attachments` views to have differing `edge` and `gutter` properties.
* Add `edge()`, a method used to calculate the optimal dimensions for an attachment based on the current width of the `Attachments` container element.
* `edge()` is currently only enabled on resize, as the relative positioning and CSS transforms used to center thumbnails are suboptimal when coupled with frequent resizing.
* Next steps: For infinite scroll performance improvements, look into absolutely positioning attachment views and paging groups of attachment views.

`wp.media.view.UploaderWindow`
* Now generates a `$browser` element as the browse button (instead of a full `UploaderInline` view). Using a portable browse button prevents us from having to create a new `wp.Uploader` instance every time we want access to a browse button.

`wp.media.view.UploaderInline`
* No longer directly linked to the `UploaderWindow` view or its `wp.Uploader` instance.
* Used as the default `upload` state view.

`wp.media.view.Selection`
* An interactive representation of the selected `Attachments`.
* Based on the improved workflows, this is likely overkill. For simplicity's sake, will probably remove this in favor of `SelectionPreview`.

----

see #21390.



git-svn-id: https://develop.svn.wordpress.org/trunk@22362 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-04 22:59:12 +00:00
Ryan Boren 351979863e jQuery UI 1.9.1
Props ocean90
fixes #22290


git-svn-id: https://develop.svn.wordpress.org/trunk@22361 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-03 22:51:38 +00:00
bumpbot 4dbb7eb959 Compress scripts/styles: 3.5-beta2-22360.
git-svn-id: https://develop.svn.wordpress.org/trunk@22360 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-02 22:58:37 +00:00
Andrew Nacin a6a8321d7d clean_post_cache() no longer calls itself recursively. see #11399.
git-svn-id: https://develop.svn.wordpress.org/trunk@22357 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-02 16:13:53 +00:00
Daryl Koopersmith a8b411b563 Media: Update the gallery "add images" state. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22356 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-02 01:20:01 +00:00
Nikolay Bachiyski e9fbc52474 Fix typos in comments. Props SergeyBiryukov, see #22337
git-svn-id: https://develop.svn.wordpress.org/trunk@22355 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 23:56:23 +00:00
Dion Hulse 3d40fbad80 Fix a PHP Notice when attempting to Add or remove capabilities from nonexistant roles. Props SergeyBiryukov. Fixes #18461
git-svn-id: https://develop.svn.wordpress.org/trunk@22354 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 23:18:33 +00:00
Mark Jaquith 2dc29f9587 Clean up [22347] a bit. see #14348
git-svn-id: https://develop.svn.wordpress.org/trunk@22353 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 23:01:13 +00:00
bumpbot 7bd3be3ca2 Compress scripts/styles: 3.5-beta2-22352.
git-svn-id: https://develop.svn.wordpress.org/trunk@22352 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 22:58:32 +00:00
Jon Cave e62a2b0327 Add Instagram oEmbed support. Props bananastalktome. Fixes #21704.
git-svn-id: https://develop.svn.wordpress.org/trunk@22351 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 22:45:23 +00:00
Nikolay Bachiyski b5b580e50a Replace gp_endswith() with working implementation
In [22349] we introduced a call to gp_endswith(),
whcih doesn't exist in WordPress, only in GlotPress.

See #22337


git-svn-id: https://develop.svn.wordpress.org/trunk@22350 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 22:26:20 +00:00
Nikolay Bachiyski 1a9ffb97a7 Sync POMO with GlotPress
See http://glotpress.trac.wordpress.org/browser/trunk/pomo/


git-svn-id: https://develop.svn.wordpress.org/trunk@22349 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 22:13:51 +00:00
Daryl Koopersmith 794c7f6b1c Media: Update gallery editing to work with the new frame view. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22348 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 21:43:59 +00:00
Mark Jaquith 921c060e18 When receiving a HEAD request, die() right before we start outputting content.
* Content doesn't make sense for HEAD requests
* Saves wear and tear on the server
* Introduces a filter: exit_on_http_head (we send TRUE through it)

fixes #14348. props mbijon, mitchoyoshitaka.

git-svn-id: https://develop.svn.wordpress.org/trunk@22347 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 21:39:23 +00:00
Dion Hulse 8da6cfb9fc Theme Translations: Allow for theme pomo files to be loaded from WP_LANG_DIR/themes/{$domain}-{$locale}.(p|m)o.
This directory format is what we have chosen for Language Packs (See #18200), but which is currently delayed.

By making this change, we can ship localised theme files within core for bundled themes, and avoid the issues associated with Theme Updates overwriting/removing the language files.

Fixes #18960



git-svn-id: https://develop.svn.wordpress.org/trunk@22346 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 21:30:33 +00:00
Daryl Koopersmith 18723b0970 Media: Reduce button size for the link gallery setting. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22345 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 21:03:27 +00:00
Daryl Koopersmith 9703b3a86f Media JS: When editing a gallery, prevent attachments from being selected as they are removed. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22344 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 20:51:34 +00:00
Daryl Koopersmith 80cd7ad468 Fix positioning of attachment thumbnail overlays.
Prevents the overlay from blocking buttons inside the attachment preview, such as the remove button in the gallery editor.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22343 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 20:34:50 +00:00
Daryl Koopersmith 90888aaebd Remove dead gallery settings code. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22342 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 20:00:39 +00:00
Daryl Koopersmith 791d93553a Make gallery columns fallback a string, as the accepted values are strings. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22341 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 20:00:02 +00:00
Daryl Koopersmith 3a64c92cf1 Add gallery settings to the media modal.
* Abstracts `wp.media.view.AttachmentDisplaySettings` into `wp.media.view.Settings` for managing lists of settings with button groups and select boxes. Settings can optionally be tied to a user setting (i.e. using `getUserSetting`).
* Adds `wp.media.view.Settings.AttachmentDisplay`.
* Adds `wp.media.view.Settings.Gallery`.

see #21390, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22340 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-31 19:22:25 +00:00
Daryl Koopersmith 61ad4ebfa2 Media JS: Several improvements to the Attachment views.
* Bind Attachment details updates to the Attachments initialize method.
* Improve Attachment view unbinding.
* Re-render Attachment views when titles and captions are updated.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22339 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-30 23:59:57 +00:00
Daryl Koopersmith b5652fb180 Media JS: Properly fire the Attachment view details method on render. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22338 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-30 23:41:13 +00:00
Daryl Koopersmith 6deb5064ee Media JS: Properly build detail views when the selection's single model changes. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22337 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-30 23:36:38 +00:00
Daryl Koopersmith c67117e150 Media CSS: Remove inner shadow when attachment is selected. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22336 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-30 23:16:28 +00:00
Daryl Koopersmith ee6bda8ddd Media JS: Improve handling of single attachments in selections.
* Adds `wp.media.model.Selection.single()` to specify a single item used in a multi-item selection.
* Fixes a bug where the `details` class would not be removed when "Clear Selection" was clicked.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22335 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-30 23:15:16 +00:00
bumpbot 936f82bb1f Compress scripts/styles: 3.5-beta2-22334.
git-svn-id: https://develop.svn.wordpress.org/trunk@22334 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-30 22:58:31 +00:00
Daryl Koopersmith 66259023dd Media JS: Remove unused Attachment view events. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22333 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-30 21:15:46 +00:00
Daryl Koopersmith 59c70a3061 Improve selection UI/behavior in the media modal.
* Moves handling which models are in the selection into the `Library` state.
* Adds highlight for the last-selected view in a multi-view state.
* A view must be the last-selected view before it can be deselected.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22332 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-30 21:09:45 +00:00
Dion Hulse 499f18d2c2 Prevent an issue on windows systems which can cause the temporary directory from get_temp_dir() from returning a path containing \/. Props to SergeyBiryukov for the initial patch. Fixes #20778
git-svn-id: https://develop.svn.wordpress.org/trunk@22331 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-30 20:58:35 +00:00
Dion Hulse 5792b83c42 When reading local feeds from disk, check that the file exists first to avoid a PHP Warning in WP_SimplePie_File. Props SergeyBiryukov. Fixes #17756
git-svn-id: https://develop.svn.wordpress.org/trunk@22330 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-30 20:48:35 +00:00
Andrew Ozz 2d6b896243 Buttons: make install.css depend on buttons.css (so button styles are always loaded), see #21598
git-svn-id: https://develop.svn.wordpress.org/trunk@22327 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-30 16:28:13 +00:00
bumpbot db035ece96 Compress scripts/styles: 3.5-beta2-22326.
git-svn-id: https://develop.svn.wordpress.org/trunk@22326 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-29 22:58:31 +00:00
Daryl Koopersmith 82270d36ef Improve attachment detailed preview styling. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22325 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-29 18:16:12 +00:00
Daryl Koopersmith 3ca8808c3b Add dynamic attachment view sizing. Removes the attachment view zooming in the process. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22324 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-29 18:05:03 +00:00
Daryl Koopersmith bc29728df2 Add attachment details to the media sidebar.
* Also moves most of the `Frame` view's `createSelection` method to a real `Selection` model (which inherits from the `Attachments` model).
* Properly assigns the library within the `Gallery` state, allowing for the `Gallery` state to inherit from the `Library` state.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22323 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-29 15:13:02 +00:00
Daryl Koopersmith 6e387bb2db Add inline uploader UI to media modal sidebar. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22322 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-29 07:38:13 +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
bumpbot 9252a8fcb9 Compress scripts/styles: 3.5-beta2-22315.
git-svn-id: https://develop.svn.wordpress.org/trunk@22315 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-26 22:58:34 +00:00
Andrew Ozz c71700c7b4 Buttons:
- Update the install/initial configuration/repair screens buttons, props DrewAPicture
- Fix the welcome screen buttons and fine-tune the buttons css, props lessbloat

fixes #21598


git-svn-id: https://develop.svn.wordpress.org/trunk@22314 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-26 19:40:39 +00:00
Andrew Nacin 32c92b7a01 If we have not yet initialized the custom header/background, do not do extra removal in _remove_theme_support(). fixes #22246.
git-svn-id: https://develop.svn.wordpress.org/trunk@22313 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-26 04:17:25 +00:00
Andrew Nacin 556332cee8 Revert [22274]. see #22246.
git-svn-id: https://develop.svn.wordpress.org/trunk@22312 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-26 04:16:49 +00:00
bumpbot e21f4c8eb5 Compress scripts/styles: 3.5-beta2-22311.
git-svn-id: https://develop.svn.wordpress.org/trunk@22311 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 22:58:32 +00:00
Ryan Boren d76c931269 Fix wp_basename() for Windows by replacing %5C with /.
Props SergeyBiryukov
fixes #22138


git-svn-id: https://develop.svn.wordpress.org/trunk@22310 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 22:31:17 +00:00
Jon Cave c8c4a683c1 Fix documentation typo: s/WP_Erorr/WP_Error/. See #21593.
git-svn-id: https://develop.svn.wordpress.org/trunk@22309 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 22:29:37 +00:00
Ryan Boren fd8eeb4b8a Consolidate some transalted strings. Remove unnecessary trailing newlines. Props pavelevap. fixes #22274
git-svn-id: https://develop.svn.wordpress.org/trunk@22308 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 22:21:15 +00:00
Ryan Boren f27a713d56 Return WP_Error when registering a taxonomy that exceeds 32 characters.
Props ocean90.
fixes #21593


git-svn-id: https://develop.svn.wordpress.org/trunk@22307 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 22:12:02 +00:00
Andrew Ozz b9fa351736 Hide the "You are using the multi-file uploader. Problems? Try the browser uploader instead." when Plupload falls back to "html4" runtime, fixes #19496
git-svn-id: https://develop.svn.wordpress.org/trunk@22305 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 20:53:38 +00:00
Andrew Nacin 3583696de7 When replacing floats in wpdb::prepare(), avoid escaped placeholders (%%f). props SergeyBiryukov. fixes #19861.
git-svn-id: https://develop.svn.wordpress.org/trunk@22304 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 20:52:50 +00:00
Andrew Nacin 8e674037bc Avoid 'headers already sent' messages for header_remove() the same way we currently do with header(). props ryan. fixes #22258.
git-svn-id: https://develop.svn.wordpress.org/trunk@22303 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 20:38:55 +00:00
Andrew Nacin 80a1e11ab0 Confirm that the nav menu's underlying object is in the proper taxonomy before adding the current-menu-item class. props SergeyBiryukov. fixes #21369.
git-svn-id: https://develop.svn.wordpress.org/trunk@22302 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 20:32:01 +00:00
Andrew Nacin 7ff116f14a When stripping off a pathinfo home root (/index.php/) do it with case insensitivity. props SergeyBiryukov. fixes #13164. see #8847.
git-svn-id: https://develop.svn.wordpress.org/trunk@22298 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 20:09:54 +00:00
Ryan Boren 5108ff8b1e Avoid notices in get_*_template() functions that use get_queried_object(), which can return null. Props wonderboymusic. fixes #20519
git-svn-id: https://develop.svn.wordpress.org/trunk@22293 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 12:54:50 +00:00
bumpbot a5d0972890 Compress scripts/styles: 3.5-beta2-22292.
git-svn-id: https://develop.svn.wordpress.org/trunk@22292 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-24 22:58:36 +00:00
Ryan Boren 308c702183 Use the create_posts capability in more places.
In get_post_type_capabilities(), make sure create_posts reflects customizations to the edit_posts capability when create_posts is not specifically set.


git-svn-id: https://develop.svn.wordpress.org/trunk@22291 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-24 22:15:43 +00:00
Andrew Ozz 8564fb5851 Fix the buttons in IE, make them better in IE7, remove the default padding in Firefox, make all .button <a> and <input> look the same, fixes #21598
git-svn-id: https://develop.svn.wordpress.org/trunk@22289 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-24 01:33:59 +00:00
Andrew Ozz 108c09fdd3 Buttons: slightly bolder :focus styles, make the "Log In" button '.button-large', props lessbloat, see #21598
git-svn-id: https://develop.svn.wordpress.org/trunk@22288 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-24 01:27:56 +00:00
bumpbot 0a05a064cf Compress scripts/styles: 3.5-beta2-22287.
git-svn-id: https://develop.svn.wordpress.org/trunk@22287 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 22:58:40 +00:00
Ryan Boren d6ed09153f Revert [21420] and [21481]. Accepting a string caused back compat problems including the possibility of revealing previously hidden circular dependencies resulting in infinite loops.
fixes #20683 #22111
see #21520


git-svn-id: https://develop.svn.wordpress.org/trunk@22286 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 20:32:12 +00:00
Andrew Nacin 08dafbce51 Do not issue a Last-Modified header when issuing no-cache headers to avoid aggressive (webkit) caching. Serve a blank header when header_remove() is not available (PHP < 5.3). props andy. fixes #22258.
git-svn-id: https://develop.svn.wordpress.org/trunk@22283 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 15:45:44 +00:00
Andrew Nacin 8bccce8189 Reset box-sizing to toolbar CSS to avoid conflicts with themes. props betzster, fixes #21863.
git-svn-id: https://develop.svn.wordpress.org/trunk@22280 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 14:30:03 +00:00
Andrew Nacin ffa6fd2e62 Prime post caches for the Recent Comments widget. props mitchoyoshitaka. see #15400.
git-svn-id: https://develop.svn.wordpress.org/trunk@22278 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 14:18:37 +00:00
Ryan Boren abda77ed10 In wp_xmlrpc_server::_insert_post(), don't return an error if set_post_thumbnail() returns false when the attachment ID doesn't change.
Props picklepete
fixes #22204


git-svn-id: https://develop.svn.wordpress.org/trunk@22277 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 14:08:20 +00:00
Ryan Boren abd1718828 A more generic message for wp_upload_dir(). Props nacin. fixes #21796
git-svn-id: https://develop.svn.wordpress.org/trunk@22276 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 13:49:00 +00:00
Ryan Boren 307979a247 Avoid notices in _remove_theme_support(). Props alex-ye, SergeyBiryukov. fixes #22246
git-svn-id: https://develop.svn.wordpress.org/trunk@22274 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 13:20:40 +00:00
Peter Westwood 44682216a8 i18n: Fix the usage of sprintf replacements in the Multisite include files. See #22260.
git-svn-id: https://develop.svn.wordpress.org/trunk@22270 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 11:27:20 +00:00
bumpbot d69a863ac2 Compress scripts/styles: 3.5-beta2-22269.
git-svn-id: https://develop.svn.wordpress.org/trunk@22269 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-22 22:58:34 +00:00
Andrew Ozz 1380819bfe Improve visible focus in the admin, props lessbloat, fixes #21324
git-svn-id: https://develop.svn.wordpress.org/trunk@22268 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-22 19:51:51 +00:00
Daryl Koopersmith b246624b4f Correctly assign post_parent to attachments uploaded in the new media modal. fixes #22085, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22267 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-22 17:40:06 +00:00
bumpbot b270741ecd Compress scripts/styles: 3.5-beta2-22265.
git-svn-id: https://develop.svn.wordpress.org/trunk@22265 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-19 22:58:33 +00:00
Ryan Boren 8bc27f2c58 Don't wp_cache_add() stdClass objects in get_post() to avoid polluting the cache with incomplete or otherwise compromised objects.
Declare the core properties of WP_Pist as proper public properties and provide them with defaults.

Props wonderboymusic
fixes #22223


git-svn-id: https://develop.svn.wordpress.org/trunk@22264 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-19 21:53:17 +00:00
Andrew Ozz 469a3d226b Make the admin menu and toolbar work well on mobile devices, props georgestephanis, see #20614
git-svn-id: https://develop.svn.wordpress.org/trunk@22262 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-19 18:31:21 +00:00
Andrew Nacin 6da3f40a96 Remove bogus optional value for get_cat_ID(). (Incorrect usage will result in a warning.) props Latz. fixes #21201.
git-svn-id: https://develop.svn.wordpress.org/trunk@22260 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-18 01:40:42 +00:00
Ryan Boren 361ecbb452 If posts is an empty array, bail from set_found_posts(). If posts is null or otherwise empty proceed through set_found_posts(). This accommodates caching plugins such as Advanced Post Cache that force posts to be empty for later population but still require the found_posts_query filter to run.
fixes #14426


git-svn-id: https://develop.svn.wordpress.org/trunk@22258 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-17 20:57:23 +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 e033812490 Pass each url in ping_sites through esc_url_raw() upin save. This ensures the urls have a valid protocol and avoids "Unable to parse URL" warning in WP_Http. Props SergeyBiryukov. fixes #21966
git-svn-id: https://develop.svn.wordpress.org/trunk@22255 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-17 17:44:40 +00:00
Ryan Boren 44a84d7b06 Correct phpdoc for wpdb::bail(). wp_die() is issued when show_errors is true, not false. Props SergeyBiryukov. fixes #22211
git-svn-id: https://develop.svn.wordpress.org/trunk@22254 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-17 13:11:45 +00:00
bumpbot 7f2fa09f5c Compress scripts/styles: 3.5-beta2-22252. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@22252 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 22:58:39 +00:00
Andrew Ozz c0ca932fe1 Editor: fix setting wpActiveEditor when TinyMCE is not used, see #21718
git-svn-id: https://develop.svn.wordpress.org/trunk@22251 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 22:01:30 +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
Andrew Ozz 7c30ff0dcb Accessibility shortcuts: new looks and fix for the WebKit focus bug, props lessbloat, fixes #21471
git-svn-id: https://develop.svn.wordpress.org/trunk@22249 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 21:26:59 +00:00
Ryan Boren 1d02d4bf27 Return WP_User objects when querying 'all' fields with WP_User_Query.
Allow passing stdClass or WP_User to the WP_User constructor.

fixes #22057


git-svn-id: https://develop.svn.wordpress.org/trunk@22248 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 20:05:40 +00:00
Daryl Koopersmith 9e8cd23bdb Add attachment display settings to the media modal.
* Add a media view for button groups.
* Add button dropdown containers.
* Add a dropdown property to the button media model.

fixes #22206, #21814, see #21390, #21813, #21598.


git-svn-id: https://develop.svn.wordpress.org/trunk@22247 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 19:25:17 +00:00
Andrew Ozz c593ca433a TinyMCE: fix showing popup buttons on images in WebKit, fixes #22188
git-svn-id: https://develop.svn.wordpress.org/trunk@22246 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 18:16:29 +00:00
Daryl Koopersmith b8b5c89522 Add a down arrow button. see #21598, #21390, #21813.
git-svn-id: https://develop.svn.wordpress.org/trunk@22245 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 15:42:34 +00:00
Ryan Boren 10677cdac8 Pass the result of the the_preview filter through get_post() to ensure the post is filtered and of type WP_Post. fixes #22162
git-svn-id: https://develop.svn.wordpress.org/trunk@22244 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 13:48:07 +00:00
Ryan Boren 655a2e51e7 Return WP_Error when no editor is selected. Props markoheijnen. see #6821
git-svn-id: https://develop.svn.wordpress.org/trunk@22243 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 13:46:00 +00:00
Daryl Koopersmith 55b4a66c55 Add button groups. see #21598, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22242 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 13:34:01 +00:00
bumpbot 06399b2d14 Compress scripts/styles: 3.5-beta2-22241.
git-svn-id: https://develop.svn.wordpress.org/trunk@22241 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 22:58:34 +00:00
Daryl Koopersmith 201729df85 Revise and combine button selectors.
* Simplifies button selectors. Maintains backwards compatibility for several classes and makes creating new button styles considerably easier.
* Adds buttons documentation.
* Raw input submit/reset/button types now use default browser styles (instead of half-styled borders that did not look like buttons).
* Moves basic button color standardization to the beginning of wp-admin.

see #21598, #22197.



git-svn-id: https://develop.svn.wordpress.org/trunk@22239 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 21:25:25 +00:00
Ryan Boren 436bdde04c Replace the sanitize loop at the end of WP_Query::get_posts() with an array_map of get_post(). get_post() will ensure each object in the loop is sanitized and is of the type WP_Post. see #22162
git-svn-id: https://develop.svn.wordpress.org/trunk@22238 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 20:42:57 +00:00
Daryl Koopersmith 2ec630204a Consolidate buttons CSS into a single file.
Adds `wp-includes/css/buttons.css` to consolidate buttons files and make them available in a modular fashion. Buttons are included automatically with the `colors` styles, and can be included independently by running:

	`wp_enqueue_style('buttons');`

fixes #22197, see #21598.


git-svn-id: https://develop.svn.wordpress.org/trunk@22236 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 14:55:29 +00:00
Andrew Nacin 2fa64d3930 Optimize wp_update_nav_menu_item() for high performance. Only query items for a menu when we need them. Update items after updating its meta so the meta cache can be leveraged. see #22189.
git-svn-id: https://develop.svn.wordpress.org/trunk@22235 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 14:27:16 +00:00
Andrew Nacin 32687208c3 Prime post term caches for nav menu items. Avoid doing so in frontend template functions as it remains unneeded there. see #22189.
git-svn-id: https://develop.svn.wordpress.org/trunk@22233 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 14:17:50 +00:00
Andrew Nacin 70c394fb79 Avoid queries in wp_unique_post_slug() for nav menu items. see #22189.
git-svn-id: https://develop.svn.wordpress.org/trunk@22232 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 14:13:57 +00:00
Mark Jaquith b7b4a12cfd Defer the meta_id-fetching query until after comparison of the previous value, so that redundant calls to update_metadata() can bail without making that query. props nacin. fixes #22191
git-svn-id: https://develop.svn.wordpress.org/trunk@22231 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 05:51:38 +00:00
Andrew Nacin c29cae6fd4 Remove whitespace from around the WP_Post/get_post SQL string.
git-svn-id: https://develop.svn.wordpress.org/trunk@22230 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 03:08:43 +00:00
Andrew Nacin 4d01cd49ed Duplicate comments should be allowed under a different comment parent. props andy. fixes #21609.
git-svn-id: https://develop.svn.wordpress.org/trunk@22229 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-14 17:06:37 +00:00
Andrew Nacin bb5d96a722 jQuery Masonry for uploaded custom headers. props zamoose. fixes #20346.
git-svn-id: https://develop.svn.wordpress.org/trunk@22228 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-14 17:05:16 +00:00
Andrew Nacin 70f79ffef3 Fix typo and don't always return false from image_make_intermediate_size(). props gandham, see #22181.
git-svn-id: https://develop.svn.wordpress.org/trunk@22225 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-13 06:46:17 +00:00
Andrew Nacin 64849177a9 3.5-beta2.
git-svn-id: https://develop.svn.wordpress.org/trunk@22224 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 23:31:17 +00:00
bumpbot d1b1bdfe8c Compress scripts/styles: 3.5-beta1-22223. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@22223 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 22:58:48 +00:00
Andrew Nacin 217c37b516 Have wp_upload_dir() account for blog switching, ms-files rewriting, and the UPLOADS constant properly. This type of logic needs a lot of code comments.
Prevents wp_upload_dir() from obeying the UPLOADS constant when ms-files rewriting is enabled and a blog is switched.

Reverts [22106] thanks to [22108].

see #19235.



git-svn-id: https://develop.svn.wordpress.org/trunk@22222 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 22:05:02 +00:00
Daryl Koopersmith bf02be2b60 Display gallery and attachment MCE views as inline blocks. Make gallery MCE view wrappers block level. see #21390, #21813, #21815.
git-svn-id: https://develop.svn.wordpress.org/trunk@22221 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 18:41:38 +00:00
Daryl Koopersmith 4966b15409 Properly align MCE attachment views.
* Adds a `$wrapper` property to MCE views to allow them to manipulate the wrapper on render. This should be used sparingly — only for layout changes that cannot be accomplished through altering the wrapper's children — and likely only for adding/removing classes.
* Uses `wp.html.string()` in `wp.mce.view.toView()`.

see #21390, #21812, #21813.


git-svn-id: https://develop.svn.wordpress.org/trunk@22220 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 18:36:21 +00:00
Daryl Koopersmith 18b3efaf52 MCE Views: Add alignment styles for generic views.
Adds `alignnone`, `aligncenter`, `alignleft`, and `alignright` by default.

see #21390, #21812, #21813.


git-svn-id: https://develop.svn.wordpress.org/trunk@22219 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 18:32:12 +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 60a44a0865 MCE Views: First pass at keystroke and insertion handling.
* When a MCE view is selected, normal keystrokes (those without command/control) are blocked.
* Backspace/delete will successfully remove the view.
* Arrow handling will be added at a later point.
* When a MCE view is selected and content is pasted or injected (e.g. when an attachment is added), the content is added to the first text node after the view. If the view is at the end of the document or the next element is another view, a text node is injected into the DOM immediately after the selected view.

see #21390, #21812, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22210 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 03:28:22 +00:00
Daryl Koopersmith 4af634578a MCE Views: Add selection/deselection when a view is clicked.
These methods should be expanded to prevent content from being inserted into the view by blocking and rerouting keystrokes as appropriate as well as repositioning the caret before content is inserted.

see #21390, #21812, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22208 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 23:52:09 +00:00
bumpbot 936cf22c7a Compress scripts/styles: 3.5-beta1-22204.
git-svn-id: https://develop.svn.wordpress.org/trunk@22204 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 22:58:47 +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 000f9e6140 Use wp_update_post() rather than wp_insert_post() in wp_publish_post() to avoid stomping of values like categories. props ericmann, fixes #22167. see #21963.
git-svn-id: https://develop.svn.wordpress.org/trunk@22189 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 17:36:59 +00:00
Ryan Boren bcbfb2c8e9 Sync actions between update_blog_details() and update_blog_status(). Add make_delete_blog and make_undelete_blog actions.
Props Kyrylo, wonderboymusic
fixes #20305


git-svn-id: https://develop.svn.wordpress.org/trunk@22185 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 12:37:46 +00:00
Daryl Koopersmith a5fc058f89 Media Modal: Improve attachment remove button styles. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22184 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 04:11:47 +00:00
Daryl Koopersmith 37fe9438dd Media Modal: Attachments on the gallery page now inherit general events with the exception of click-to-select. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22183 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 04:04:12 +00:00
Andrew Nacin a6b7bda12f jQuery 1.9.0 final. see #21736.
git-svn-id: https://develop.svn.wordpress.org/trunk@22182 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 03:34:19 +00:00
Andrew Nacin d275546925 Bump jQuery version in the script loader. see #21957.
git-svn-id: https://develop.svn.wordpress.org/trunk@22181 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 03:29:02 +00:00
Daryl Koopersmith 7dbf364156 Media Modal: Remove the outline from the modal's close button. props lessbloat, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22180 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 02:54:19 +00:00
Daryl Koopersmith ce6ac7d7aa Media Modal: Increase delay of attachment zoom. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22179 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 01:28:41 +00:00
Daryl Koopersmith 2f6ad44bfd Media Modal: Reduce height on the attachment captions from three lines to two. see #21390, #21807.
git-svn-id: https://develop.svn.wordpress.org/trunk@22178 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 00:55:38 +00:00
Daryl Koopersmith c32509dcf3 Media Modal: Remove unused CSS. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22177 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 00:37:23 +00:00
Daryl Koopersmith b0d215a771 Media Modal: Show progress bars for uploading images, and adjust progress bar styles to compensate for the darker attachment background. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22176 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 00:36:42 +00:00
Daryl Koopersmith 56829be438 Media Modal: Only automatically select uploading attachments when in a workflow that supports multiple images.
Fixes a bug in featured images where uploading an image would force you to reopen the modal (as the modal would close on upload).

see #21390, #21776.


git-svn-id: https://develop.svn.wordpress.org/trunk@22175 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 00:28:01 +00:00
Daryl Koopersmith 75160e6b3d Add caption and title default values for the attachment view template. see #21390, #21807.
git-svn-id: https://develop.svn.wordpress.org/trunk@22174 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 23:55:45 +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
bumpbot 2a0622aaba Compress scripts/styles: 3.5-beta1-22172.
git-svn-id: https://develop.svn.wordpress.org/trunk@22172 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 22:58:38 +00:00
Andrew Nacin 1215e5e066 Reference xmlrpc.php with the 'rpc' site_url() argument to ensure a proper scheme is applied. see #18731.
git-svn-id: https://develop.svn.wordpress.org/trunk@22171 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 21:55:36 +00:00
Daryl Koopersmith a830567a92 Correctly insert non-image attachments as links.
* Adds `wp.media.string.link( attachment )` for printing attachment links.
* Adds the `link` attribute to `Attachment` models that corresponds to the link to the attachment post.

see #21390, #21836.


git-svn-id: https://develop.svn.wordpress.org/trunk@22170 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 21:54:21 +00:00
Andrew Nacin ecc9b897d8 Fix fatal error in SimplePie. see #22158.
git-svn-id: https://develop.svn.wordpress.org/trunk@22169 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 21:38:10 +00:00
Andrew Nacin caa32ba980 Add post_type_labels_{$post_type} filter. props scribu. fixes #21948.
git-svn-id: https://develop.svn.wordpress.org/trunk@22164 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 13:50:42 +00:00
Ryan Boren 594ef24dca Make sure cache bucket is an array to avoid warning. see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@22163 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 12:29:51 +00:00
Daryl Koopersmith 063c4c5ae2 Add a class to the TinyMCE view end marker.
Certain TinyMCE plugins scan for all spans in the document and remove any that do not have classes (or a handful of other attributes). This is quite aggressive, and breaks the regex used to scan for MCE views when transforming them back to plain text. Adding a class ensures that any plugins that do so will not break MCE views.

see #21812, #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22162 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 10:52:14 +00:00
Daryl Koopersmith 72ab49062f Media JS: More default Attachments view template values. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22161 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 10:45:01 +00:00
Daryl Koopersmith 344d0ad7c1 Media JS: Ensure the subtype key has a default set.
Prevents undefined JS errors in the attachments view template.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22160 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 10:08:43 +00:00
Daryl Koopersmith 14de8ad04a Show filenames for non-image attachments in the new media modal.
Also passes all attachment model attributes to the attachment view template by default (instead of selecting specific values).

see #21390, #21836.


git-svn-id: https://develop.svn.wordpress.org/trunk@22159 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 09:55:47 +00:00
Daryl Koopersmith d4f1bc45ac Media JS: Improve markup and CSS of the modal view's title.
Also improves the accuracy of closing the modal when the backdrop is clicked (which became error-prone around the title bar in [22144]).

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22158 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 09:40:22 +00:00
Daryl Koopersmith 04143f286a When editing a gallery, images can now be added from the media library.
Enables the "Add images from media library" button when editing. The UX has room for improvement, but it's a start.

see #21390, #21809.


git-svn-id: https://develop.svn.wordpress.org/trunk@22157 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 09:30:22 +00:00
Daryl Koopersmith db21ce7189 Gallery editing in the media modal.
The edit button on gallery MCE views will open a new instance of the media modal. Images can be removed, uploaded, and reordered. However, the "Add images from media library" button is not yet functional.

see #21390, #21809, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22155 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 08:31:12 +00:00
Daryl Koopersmith 6500957bcd Improve styling and markup for gallery and attachment MCE views.
Attachment views can now inherit from the theme's `editor-style.css` — just have any rules that apply to the `img` tag apply to `.editor-attachment` as well.

Adds a non-functional edit button to gallery views.

see #21390, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22154 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 06:47:22 +00:00
Andrew Nacin 0485636388 Improve pingback text extraction by stopping at a closing block-level tag. props Otto42. see #21914.
git-svn-id: https://develop.svn.wordpress.org/trunk@22152 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 23:56:32 +00:00
bumpbot eeddc579d5 Compress scripts/styles: 3.5-beta1-22150.
git-svn-id: https://develop.svn.wordpress.org/trunk@22150 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 22:58:33 +00:00
Jon Cave a2a8f675da Remove allowed query args before checking isEmpty() in Query model. See #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22149 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 22:55:49 +00:00
Daryl Koopersmith 58fb98ff26 Media modal search box style updates. props helenyhou, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22145 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 03:14:18 +00:00
Daryl Koopersmith 561c3b7837 Improve media modal title bar styling. props helenyhou, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22144 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 02:56:39 +00:00
Daryl Koopersmith ed281a6f6a Improve JavaScript object formatting. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22143 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 02:07:09 +00:00
Daryl Koopersmith adbb1b623a Increase the delay on the attachment zooming in the media modal. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22142 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 01:57:34 +00:00
Daryl Koopersmith fe1645a0a9 Change the cursor to a pointer when hovering above an attachment in the media modal. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22141 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 01:17:35 +00:00
Daryl Koopersmith 497389bac8 Properly handle inserting full size images. props timbeks, fixes #22124.
git-svn-id: https://develop.svn.wordpress.org/trunk@22140 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 00:55:44 +00:00
Daryl Koopersmith f7d1953bcc On second thought, we're going to need the library-specific attachment view. see #21390, [22138].
git-svn-id: https://develop.svn.wordpress.org/trunk@22139 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 00:27:14 +00:00
Daryl Koopersmith b26a4d2cde Remove the attachment quick-insert button from the media modal. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22138 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 00:21:52 +00:00
Daryl Koopersmith 91a3c62b3f Better thumbnail previews in the image editor.
* Images are auto-cropped, then fit to the preview on hover (with a slight delay). This is an experiment; we'll see how it turns out.
* Various style changes.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22137 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-08 23:20:04 +00:00
Andrew Nacin bbd97dc498 Set show_on_front to 'posts' when no value is set. This occurs when the show_on_front checkbox is left unchecked and then sent through options.php. fixes #22131.
git-svn-id: https://develop.svn.wordpress.org/trunk@22135 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-08 18:41:19 +00:00
Andrew Nacin 64e8309d8e Request WP_User objects when caling get_users() in XML-RPC's wp.getUsers method. see #18428.
git-svn-id: https://develop.svn.wordpress.org/trunk@22134 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 23:33:35 +00:00
bumpbot d1d7ac7197 Compress scripts/styles: 3.5-beta1-22133.
git-svn-id: https://develop.svn.wordpress.org/trunk@22133 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 22:58:41 +00:00
Jon Cave a24f3fcefc Prevent accidental body class concatenation by replacing (no-)customize-support with a space
The regular expression used by wp_customize_support_script() replaces all spaces
surrounding the matching class. This caused other classes to be merged together.

Props johnpbloch, SergeyBiryukov. Fixes #22103.


git-svn-id: https://develop.svn.wordpress.org/trunk@22132 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 14:58:12 +00:00
Jon Cave 453747f8f8 Theme Customizer: Correctly update background-attachment property in live preview
Props bainternet. Fixes #21732.


git-svn-id: https://develop.svn.wordpress.org/trunk@22131 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 14:46:39 +00:00
bumpbot 9036d1e57b Compress scripts/styles: 3.5-beta1-22130.
git-svn-id: https://develop.svn.wordpress.org/trunk@22130 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 03:46:14 +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
bumpbot 2aab5aa3b0 Compress scripts/styles: 3.5-beta1-22128.
git-svn-id: https://develop.svn.wordpress.org/trunk@22128 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 02:27:48 +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
Daryl Koopersmith a165bdfb83 Improve the lazy instantiation of the 'wp' JavaScript variable. props evansolomon, fixes #22113.
git-svn-id: https://develop.svn.wordpress.org/trunk@22126 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-06 00:43:36 +00:00
Daryl Koopersmith 96cb206e15 On the gallery creation screen, only display the remove icon on hover.
git-svn-id: https://develop.svn.wordpress.org/trunk@22125 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-05 22:14:00 +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
Ryan Boren b0cae159ea Put required field indicators within labels. Update styling of bundled themes to accommodate. Props MikeHansenMe. fixes #21897
git-svn-id: https://develop.svn.wordpress.org/trunk@22123 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-05 16:34:32 +00:00
Andrew Nacin e5c363a8ff Use 2 * DAY_IN_SECONDS rather than 172800. props pavelevap. fixes #20987.
git-svn-id: https://develop.svn.wordpress.org/trunk@22121 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-05 13:11:16 +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 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
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
Andrew Nacin cc6c48b945 Remove ui.css from WP's TinyMCE theme. It was left for back compat with a reference to editor-buttons.css, which was never updated to editor.css and no one noticed.
git-svn-id: https://develop.svn.wordpress.org/trunk@21934 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 03:13:19 +00:00
bumpbot 826daf5daf Compress scripts/styles: 3.5-alpha-21931.
git-svn-id: https://develop.svn.wordpress.org/trunk@21931 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 18:59:45 +00:00
Ryan Boren 42ca24f54e * Avoid FOUND ROWS when no posts are found
* Set post_count and found_posts for all 'fields' queries.
* Set found_posts to post_count when limits are not used
* Update phpdoc for $found_posts and set_found_posts()

Props SergeyBiryukov, wonderboymusic

fixes #14426



git-svn-id: https://develop.svn.wordpress.org/trunk@21928 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 14:55:54 +00:00
Ryan Boren 0c35bf57f6 phpdoc cleanups for general-template.php. Props c3mdigital, SergeyBiryukov. fixes #21893
git-svn-id: https://develop.svn.wordpress.org/trunk@21926 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 13:52:36 +00:00
Ryan Boren 097c2c0e90 Suppress db errors when checking if the blog is already installed in install_blog(). Use DESCRIBE instead of SELECT. Props bpetty. fixes #21922
git-svn-id: https://develop.svn.wordpress.org/trunk@21924 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 13:39:46 +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
bumpbot 42f1232e5e Compress scripts/styles: 3.5-alpha-21920.
git-svn-id: https://develop.svn.wordpress.org/trunk@21920 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 18:59:36 +00:00
Ryan Boren 54e1f4abfd Improve performance of query in get_adjacent_post(). Get the ID and then call get_post(). Props apokalyptik, nacin, javert03. fixes #18120
git-svn-id: https://develop.svn.wordpress.org/trunk@21919 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 18:11:43 +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 2851d75027 Handle https for all oembed providers. Props johnjamesjacoby, gluten. fixes #20102
git-svn-id: https://develop.svn.wordpress.org/trunk@21915 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 13:46:05 +00:00
Andrew Nacin d904430fc0 Introduce the xmlrpc_login_error filter, applied to the IXR_Error being returned by the server when login() fails. props JustinSainton, fixes #21907.
git-svn-id: https://develop.svn.wordpress.org/trunk@21912 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 01:36:47 +00:00
Andrew Nacin 44cd6b7e85 Deprecate user_pass_ok() in favor of wp_authenticate(). see #21907.
git-svn-id: https://develop.svn.wordpress.org/trunk@21911 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 01:35:35 +00:00
Andrew Nacin 7854ebaeab XML-RPC: Have the deprecated login_pass_ok() method wrap login(). Move it below login() so the proper method is found first. see #21907.
git-svn-id: https://develop.svn.wordpress.org/trunk@21910 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 01:27:21 +00:00
Daryl Koopersmith 7b999727ce Rename the attachment-thumbnail class in the media modal Attachment view to prevent conflicts with wp_get_attachment_image(). see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@21909 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 01:10:17 +00:00
Daryl Koopersmith 3de3ed85fd Media JS: Prevent infinite scroll events from being unbound when Attachments views are re-rendered. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@21908 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 01:00:34 +00:00
Daryl Koopersmith 6a5a70ead3 Correct alignment of new buttons in media modal. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@21907 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 00:48:41 +00:00
Daryl Koopersmith 4442437bd5 The first inklings of a gallery management screen.
* Adds `view.Workspace.Library` and `view.Workspace.Gallery` as extensions of `view.Workspace` to implement the individual screens
* Shifts the toolbar logic that was library-specific from the generic `Workspace` view to `Workspace.Library`.
* Adds a toolbar to the `Gallery` view.
* 'Create a gallery' and 'Return to media library' buttons toggle between the two views.
* 'Insert gallery into post' closes the modal, but does not actually perform its namesake action.
* Note that elements can still be deselected in the gallery view. This will be fixed in a future commit.

Improvements to avoid over-eager event unbinding:
* `Modal` views now properly detach their contents before replacing them with a new element.
* Likewise, `Workspace` views detach their main content blocks when re-rendering the view.

To test the gallery workflow (which is incomplete), run the following in your browser's console:

	`wp.media({ multiple: true });`

see #21809, #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@21906 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 00:34:00 +00:00
Andrew Nacin 73dd371cba Stop outputting the default dir="ltr" in language_attributes(). props bergius. fixes #16852.
git-svn-id: https://develop.svn.wordpress.org/trunk@21904 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 23:08:46 +00:00
Daryl Koopersmith 3d6738c786 Media JS: Improve auto-add functionality in Workspace.render(). see #21390, [21901].
git-svn-id: https://develop.svn.wordpress.org/trunk@21902 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 22:59:57 +00:00
Daryl Koopersmith fd40ade3fb Media JS: Improve signature for `Workspace.add()` to accept two arguments instead of an ambiguous object. see #21390, [21820], [21821].
git-svn-id: https://develop.svn.wordpress.org/trunk@21901 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 22:41:51 +00:00
Daryl Koopersmith b2fb76008e Ensure the Attachments model properties are correctly set for Query collections.
After shifting sorting and searching logic from the `Query` collection in [21898], it became apparent that `Query` collections should also have an accurate `props` model, as the model controls the aforementioned searching and sorting.

see #21921, #21809, and #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@21900 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 22:19:05 +00:00
bumpbot f947a50647 Compress scripts/styles: 3.5-alpha-21899.
git-svn-id: https://develop.svn.wordpress.org/trunk@21899 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 21:59:34 +00:00
Daryl Koopersmith 592b23f94f Allow JS Attachments models to be searchable and sortable.
Moves `wp.media.model.Query` sorting and searching to the parent `wp.media.model.Attachments`.

Query parameters are stored in `attachments.props`, which is a `Backbone.Model`, and supports `order` (`'ASC'` or `'DESC'`), `orderby` (any `Attachment` model property name), `search` (a search term), and `query` (a boolean value that ties the `Attachments` collection to the server).

`wp.media.query( args )` now returns an `Attachments` set that is mapped to a `Query` collection instead of the `Query` collection itself. This allows you to change the query arguments by updating `attachments.props` instead of fetching the mirrored arguments, changing them, and passing them to `wp.media.query()` again.

fixes #21921, see #21390, #21809.


git-svn-id: https://develop.svn.wordpress.org/trunk@21898 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 21:42:29 +00:00
Andrew Nacin ba5853e0f6 Allow wp.uploadFile to upload the attachment to a post. props djzone, josephscott, maxcutler. fixes #13917.
git-svn-id: https://develop.svn.wordpress.org/trunk@21896 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 19:06:27 +00:00
bumpbot e4b2e030e3 Compress scripts/styles: 3.5-alpha-21895.
git-svn-id: https://develop.svn.wordpress.org/trunk@21895 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 18:59:37 +00:00
Andrew Nacin 5358b13ae3 Account for the old 'main override' in wp_upload_dir() for the main site in a post-MU network by declining to define the UPLOADS constant.
Fixes uploads on the main site of a post-MU network that uses ms-files rewriting. see #19235.



git-svn-id: https://develop.svn.wordpress.org/trunk@21892 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 18:07:18 +00:00
Andrew Nacin fc58815067 Clarify that conditional tags only return true for existing objects, not 404 situations. props SergeyBiryukov, fixes #16312.
git-svn-id: https://develop.svn.wordpress.org/trunk@21890 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 17:35:11 +00:00
Andrew Nacin 5869cbc05a Synchronize block-level elements between the JS and PHP versions of wpautop. props SergeyBiryukov. fixes #18534.
git-svn-id: https://develop.svn.wordpress.org/trunk@21888 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 17:32:44 +00:00
Andrew Nacin 930d3b2a99 Attach the default ms_files_rewriting site option filter in ms-default-constants, as ms-default-filters is not included during SHORTINIT. see #19235.
git-svn-id: https://develop.svn.wordpress.org/trunk@21881 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-17 22:05:06 +00:00
bumpbot 4c9bac8206 Compress scripts/styles: 3.5-alpha-21879. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21879 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-17 00:59:40 +00:00
Andrew Nacin 411e45256a On user creation, default the display name to the first and last names provided. props mikelittle for the initial patch. fixes #20637.
git-svn-id: https://develop.svn.wordpress.org/trunk@21876 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 22:33:24 +00:00
Andrew Ozz 2bd5e1830b Switch TinyMCE's schema to 'html5', add 'autofocus' to the attributes map for <input>, part props SergeyBiryukov, fixes #13314
git-svn-id: https://develop.svn.wordpress.org/trunk@21875 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 21:20:35 +00:00
Andrew Nacin a37458e797 Add a filter to wp_get_update_data. props usermrpapa, SergeyBiryukov. fixes #17838.
git-svn-id: https://develop.svn.wordpress.org/trunk@21874 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 20:51:51 +00:00
Andrew Nacin e33241bef0 If a nav menu has no menu items, print nothing (instead of empty container markup). props obenland. fixes #21576.
git-svn-id: https://develop.svn.wordpress.org/trunk@21868 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 17:07:56 +00:00
Andrew Nacin 1563fce7ff Use selected() in default widgets. props SergeyBiryukov, iamfriendly. fixes #21451.
git-svn-id: https://develop.svn.wordpress.org/trunk@21867 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 16:51:12 +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 9447d32ef4 Simplify protocol stripping in add_query_arg() by avoiding a regular expression. Don't cast a known array to an array. fixes #21332.
git-svn-id: https://develop.svn.wordpress.org/trunk@21865 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-16 16:16:26 +00:00
Andrew Nacin 2815798357 Make WP_Tax_Query::transform_query() public. props scribu. fixes #21684.
git-svn-id: https://develop.svn.wordpress.org/trunk@21863 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-15 20:17:03 +00:00
Andrew Nacin 9b8123711c Split tag names by [\r\n\t ] rather than \s to avoid that character class from eating characters. props rstern, SergeyBiryukov. fixes #21779. see #13413.
git-svn-id: https://develop.svn.wordpress.org/trunk@21862 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-15 20:13:44 +00:00
Andrew Nacin 383487466b Expect a possible array of post types in get_archive_template(). props SergeyBiryukov. fixes #20867.
git-svn-id: https://develop.svn.wordpress.org/trunk@21861 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-15 20:07:15 +00:00
Andrew Nacin 9da4708e6d Pass the user parameter to the wpmu_validate_blog_signup filter and wpmu_validate_blog_signup()'s return array. props BrianLayman. fixes #17306.
git-svn-id: https://develop.svn.wordpress.org/trunk@21860 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-15 20:05:58 +00:00
Andrew Nacin 326731cdb3 Add Pinyin diacritics to remove_accents(). Remove these diacritics in sanitize_title_with_dashes() on save as well. props bolo1988, SergeyBiryukov. fixes #20772.
git-svn-id: https://develop.svn.wordpress.org/trunk@21859 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-15 20:01:08 +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 322919eb1c When doing a taxonomy query, search against the currently registered post types of the queried taxonomies.
Prevents posts of a type no longer assigned to a queried taxonomy from being returned.

props jondavidjohn. fixes #21290.



git-svn-id: https://develop.svn.wordpress.org/trunk@21855 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-15 19:44:51 +00:00
Andrew Nacin 0b2a08728b Pass current network ID to domain_exists() in wpmu_validate_blog_signup(). props larysa, fixes #17303.
git-svn-id: https://develop.svn.wordpress.org/trunk@21853 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-15 19:29:59 +00:00
Andrew Nacin 42a2b4a12f "[ ] Discourage search engines from indexing this site". fixes #16416.
git-svn-id: https://develop.svn.wordpress.org/trunk@21851 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 20:26:20 +00:00
Andrew Nacin 8c13f286e3 Use the non-slashing variants of kses functions in sanitize_option() to avoid slash ping pong. fixes #21892.
git-svn-id: https://develop.svn.wordpress.org/trunk@21850 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 19:32:53 +00:00
Andrew Nacin 04b5a04297 Don't output the {$post_type} post class in the admin, to avoid clashes with admin CSS. props c3mdigital. fixes #21203.
git-svn-id: https://develop.svn.wordpress.org/trunk@21848 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 18:57:11 +00:00
Andrew Nacin 9a0d9562a2 Use wp_get_theme()->get_page_templates() rather than get_page_templates() in wp_insert_post(),
to allow page template setting on the frontend without a fatal error. fixes #21755.



git-svn-id: https://develop.svn.wordpress.org/trunk@21847 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 18:36:08 +00:00
Andrew Nacin 0ce7f85ca4 Remove unused show_in_admin_all and single_view_cap from register_post_status(). props duck_. fixes #18972.
git-svn-id: https://develop.svn.wordpress.org/trunk@21846 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 18:02:23 +00:00
Andrew Nacin 5b132e4c24 In get_page_by_path(), attempt to return an item that has the same post type before returning an attachment with the same name. props SergeyBiryukov. tests in [UT1021]. fixes #15665.
git-svn-id: https://develop.svn.wordpress.org/trunk@21845 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 17:19:25 +00:00
Andrew Nacin 6d2fc0af91 If update_post_caches() does not receive a post type, glean post types from the individual post objects, rather than assuming 'post'. fixes #20177.
git-svn-id: https://develop.svn.wordpress.org/trunk@21844 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 16:26:05 +00:00
Andrew Nacin c1d96d72b4 Update docs to reflect that wp_count_terms() can return WP_Error when the taxonomy does not exist. props SergeyBiryukov, fixes #21888.
git-svn-id: https://develop.svn.wordpress.org/trunk@21843 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-14 16:11:30 +00:00
Andrew Nacin 0cc58945a6 Calendar widget: Don't print widget title markup when the title is empty. props jakub.tyrcha. fixes #17837.
git-svn-id: https://develop.svn.wordpress.org/trunk@21841 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 19:46:24 +00:00
Andrew Nacin 0607d6b562 Switch $args and $url for the oembed_fetch_url filter introduced in [21839]. A bit more logical, especially given the order of arguments passed to fetch(). see #16996.
git-svn-id: https://develop.svn.wordpress.org/trunk@21840 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 17:49:23 +00:00
Andrew Nacin c2df87ff7d Introduce an oembed_fetch_url filter to be applied before sending the request.
props Otto42, r-a-y. fixes #16996.



git-svn-id: https://develop.svn.wordpress.org/trunk@21839 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 17:45:36 +00:00
Andrew Nacin b4fa70c19c Add nonce_user_logged_out filters to wp_create_nonce() and wp_verify_nonce() for when there is no user ID. Provides plugins the ability to tie a nonce to some other characteristic of the session. props sc0ttkclark, fixes #21111.
git-svn-id: https://develop.svn.wordpress.org/trunk@21837 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 17:17:47 +00:00
Andrew Nacin 80e56f5a88 Check that the taxonomy matches when calling is_tax() with only a taxonomy argument. props wonderboymusic, see #20590.
git-svn-id: https://develop.svn.wordpress.org/trunk@21836 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 17:15:13 +00:00
Andrew Nacin b0bcbe0b01 Switch to sans-serif for the font stack in Thickbox as we have done elsewhere. props wet, fixes #20268.
git-svn-id: https://develop.svn.wordpress.org/trunk@21834 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 17:08:01 +00:00
Andrew Nacin 22ba686ace Don't sanitize include and exclude in gallery_shortcode(), as this is handled further down the stack, and better. props SergeyBiryukov, TobiasBg. fixes #21827.
git-svn-id: https://develop.svn.wordpress.org/trunk@21833 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 17:06:25 +00:00
Andrew Nacin cb682a8b61 Allow supports => false to be passed to register_post_type() to disable the default title and editor.
An empty array may also disable all default features in the future.
Do not rely on this behavior: always specify title and editor if you want them.

props sc0ttkclark.
fixes #21586.



git-svn-id: https://develop.svn.wordpress.org/trunk@21831 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 17:02:39 +00:00
Andrew Nacin 78cc9eac60 oEmbed uses author_can(), not current_user_can(). props DrewAPicture, fixes #21880.
git-svn-id: https://develop.svn.wordpress.org/trunk@21830 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 16:42:43 +00:00
Andrew Nacin 5ca6a857a2 Don't cache a non-existent link in get_bookmark(). props wonderboymusic, fixes #21159.
git-svn-id: https://develop.svn.wordpress.org/trunk@21829 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 16:41:43 +00:00
Andrew Nacin 518d14331c When balancing tags, properly close tags that shouldn't be self-closed but are. Support all self-closing tags.
props coffee2code.
fixes #1597.



git-svn-id: https://develop.svn.wordpress.org/trunk@21828 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-13 16:39:06 +00:00
Andrew Nacin c6fa13adc9 Add xmpp to allowed protocols. props ethitter, fixes #21604.
git-svn-id: https://develop.svn.wordpress.org/trunk@21826 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-12 15:47:34 +00:00
Andrew Nacin 5d3c3fcfba Don't show Appearance > Widgets if the theme has no sidebars defined. props SergeyBiryukov for the initial patch. fixes #21761.
git-svn-id: https://develop.svn.wordpress.org/trunk@21825 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-12 02:16:46 +00:00
Andrew Nacin f8d075eca3 XML-RPC: Introduce wp.getUsers, wp.getUser, wp.getProfile, wp.editProfile.
props maxcutler.
props nprasath002 for earlier patches.

see #18428.



git-svn-id: https://develop.svn.wordpress.org/trunk@21824 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-12 00:04:21 +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 c1eaaf31b8 Always return upload directory information from wp_upload_dir(), even if there is an error. Append the error to the array. see #19235.
git-svn-id: https://develop.svn.wordpress.org/trunk@21822 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 22:06:49 +00:00
Daryl Koopersmith 60ee5a5032 Media JS: When adding a view to a media workflow, add a shorthand for registering a view constructor with no options. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@21821 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 21:21:32 +00:00
Daryl Koopersmith 304569a26c Media JS: Add support for multiple views to the media workflow controller. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@21820 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 21:13:07 +00:00
Andrew Nacin 9c322a7270 Remove accidental cruft in [21804] caused by renaming variables. see #21509.
git-svn-id: https://develop.svn.wordpress.org/trunk@21819 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 20:15:56 +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
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 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 5097915ce8 Use site_url() in WP_Rewrite::mod_rewrite_rules(), rather than get_option(). props JustinSainton. fixes #21186.
git-svn-id: https://develop.svn.wordpress.org/trunk@21810 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 01:44:48 +00:00
Andrew Nacin fd6d9b96e8 Bump default memory limit from 32MB to 40MB. fixes #21646.
git-svn-id: https://develop.svn.wordpress.org/trunk@21809 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-11 01:41:56 +00:00