If $this->posts is empty, don't do stuff to it.

Props wonderboymusic
fixes #22061


git-svn-id: http://core.svn.wordpress.org/trunk@22465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Improve sidebar handling and make attachment display properties attachment-specific.

`wp.mce.media`
* Watch all workflows for the `insert` event and attempt to insert the current state's `selection` if it exists.
* Fetch and pass attachment display properties through to `wp.media.string.image()`.

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

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

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

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

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

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media JS: Add media.model.Composite, to aid in the representation of joint views. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Don't show "Skip Cropping, Publish Image as Is" button for themes that do not support headers with flexible width or height. Forces too small images to be scaled to fit in the absence of flex support.

Props MadtownLems, kobenland
fixes #21100


git-svn-id: http://core.svn.wordpress.org/trunk@22468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add SimplePie/Exception.php.

Props ocean90
fixes #22321


git-svn-id: http://core.svn.wordpress.org/trunk@22469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update help text for color picker in custom header and background screens.

Props DrewAPicture
fixes #22393


git-svn-id: http://core.svn.wordpress.org/trunk@22470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Account for unfiltered_upload cap in wp_upload_bits(). see #21292.



git-svn-id: http://core.svn.wordpress.org/trunk@22471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Return nothing in get_adjacent_post() when $in_same_cat = true but the post doesn't support (or otherwise have) categories. Avoids SQL error. props batmoo, SergeyBiryukov. fixes #15959.


git-svn-id: http://core.svn.wordpress.org/trunk@22472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add a class. see #16416.



git-svn-id: http://core.svn.wordpress.org/trunk@22473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add some ru_RU-specific CSS to the customizer to prevent the spinner from being bumped to the next line. props SergeyBiryukov, see #21890.



git-svn-id: http://core.svn.wordpress.org/trunk@22474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Compress scripts/styles: 3.5-beta2-22475.

git-svn-id: http://core.svn.wordpress.org/trunk@22475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use correct variable. props picklewagon. fixes #22394.



git-svn-id: http://core.svn.wordpress.org/trunk@22476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media JS: Add JIT composite library creation/destruction to states to allow for dynamically excluded Attachment models. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media JS: Use correct variable name when binding to the `change:library` event. see [22477], #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
HiDPI rating stars. props chexee. see #21019.



git-svn-id: http://core.svn.wordpress.org/trunk@22479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: Add batch insertion workflow. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Final HiDPI tweaks. Don't use rss-2x.png on a front-end widget. Improve selectors for favicons in the toolbar to avoid breaking existing images. Remove unnecessary RTL styles. FIXES #21019.



git-svn-id: http://core.svn.wordpress.org/trunk@22481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media: In the main media library in the insert media dialog, only show attachment display settings when one attachment is selected. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Consult the queried object for the post type. props mdgl, MikeHansenMe, wonderboymusic. fixes #21648.



git-svn-id: http://core.svn.wordpress.org/trunk@22483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Properly set upload context when uploading a background image through the customizer. props kovshenin. fixes #22215.



git-svn-id: http://core.svn.wordpress.org/trunk@22484 1a063a9b-81f0-0310-95a4-ce76da25c4cd