<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[33329] trunk/src: Site Icon: Add crop preview to the media modal.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/33329">33329</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/33329","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>obenland</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-07-20 15:56:19 +0000 (Mon, 20 Jul 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Site Icon: Add crop preview to the media modal.
* Monkey patches imgAreaSelect library to support touch events.
* Removes Settings version of Site Icon since it would have been the same flow.
* Removes default value for Customizer setting - there is no default favicon.
Fixes <a href="https://core.trac.wordpress.org/ticket/16434">#16434</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincsssiteiconcss">trunk/src/wp-admin/css/site-icon.css</a></li>
<li><a href="#trunksrcwpadminincludesclasswpsiteiconphp">trunk/src/wp-admin/includes/class-wp-site-icon.php</a></li>
<li><a href="#trunksrcwpadminjscustomizecontrolsjs">trunk/src/wp-admin/js/customize-controls.js</a></li>
<li><a href="#trunksrcwpadminoptionsgeneralphp">trunk/src/wp-admin/options-general.php</a></li>
<li><a href="#trunksrcwpincludesclasswpcustomizemanagerphp">trunk/src/wp-includes/class-wp-customize-manager.php</a></li>
<li><a href="#trunksrcwpincludescssmediaviewscss">trunk/src/wp-includes/css/media-views.css</a></li>
<li><a href="#trunksrcwpincludesjscustomizeviewsjs">trunk/src/wp-includes/js/customize-views.js</a></li>
<li><a href="#trunksrcwpincludesjsimgareaselectjqueryimgareaselectjs">trunk/src/wp-includes/js/imgareaselect/jquery.imgareaselect.js</a></li>
<li><a href="#trunksrcwpincludesjsimgareaselectjqueryimgareaselectminjs">trunk/src/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js</a></li>
<li><a href="#trunksrcwpincludesjsmediaviewsmanifestjs">trunk/src/wp-includes/js/media/views.manifest.js</a></li>
<li><a href="#trunksrcwpincludesjsmediaviewsjs">trunk/src/wp-includes/js/media-views.js</a></li>
<li><a href="#trunksrcwpincludesmediatemplatephp">trunk/src/wp-includes/media-template.php</a></li>
<li><a href="#trunksrcwpincludesscriptloaderphp">trunk/src/wp-includes/script-loader.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesjsmediacontrollerscustomizeimagecropperjs">trunk/src/wp-includes/js/media/controllers/customize-image-cropper.js</a></li>
<li><a href="#trunksrcwpincludesjsmediacontrollerssiteiconcropperjs">trunk/src/wp-includes/js/media/controllers/site-icon-cropper.js</a></li>
<li><a href="#trunksrcwpincludesjsmediaviewssiteiconcropperjs">trunk/src/wp-includes/js/media/views/site-icon-cropper.js</a></li>
<li><a href="#trunksrcwpincludesjsmediaviewssiteiconpreviewjs">trunk/src/wp-includes/js/media/views/site-icon-preview.js</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunksrcwpadminjssiteiconcropjs">trunk/src/wp-admin/js/site-icon-crop.js</a></li>
<li><a href="#trunksrcwpadminjssiteiconjs">trunk/src/wp-admin/js/site-icon.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincsssiteiconcss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/css/site-icon.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/site-icon.css 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-admin/css/site-icon.css 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2,41 +2,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 28.0 - Site Icon
</span><span class="cx" style="display: block; padding: 0 10px"> ------------------------------------------------------------------------------*/
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.site-icon-image {
- float: left;
- margin: 0 20px 0 0;
-}
-
-.site-icon-content {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.site-icon-preview .favicon-preview {
+ margin-bottom: 20px;
</ins><span class="cx" style="display: block; padding: 0 10px"> overflow: hidden;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- padding: 10px;
</del><span class="cx" style="display: block; padding: 0 10px"> position: relative;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ max-width: 180px;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.site-icon-crop-shell {
- max-width: 720px;
-}
-
-.site-icon-crop-wrapper {
- float: left;
-}
-
-.site-icon-crop-preview-shell {
- float: right;
- overflow: hidden;
-}
-
-.site-icon-crop-preview-shell h2 {
- padding-top: 0;
-}
-
-.site-icon-crop-favicon-preview-shell {
- margin-bottom: 20px;
- position: relative;
-}
-
-.site-icon-crop-preview-favicon,
-.site-icon-browser-title {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.site-icon-preview .favicon,
+.site-icon-preview .browser-title {
</ins><span class="cx" style="display: block; padding: 0 10px"> height: 16px;
</span><span class="cx" style="display: block; padding: 0 10px"> left: 88px;
</span><span class="cx" style="display: block; padding: 0 10px"> overflow: hidden;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,15 +18,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> top: 16px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.site-icon-crop-preview-favicon {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.site-icon-preview .favicon {
</ins><span class="cx" style="display: block; padding: 0 10px"> width: 16px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.site-icon-browser-title {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.site-icon-preview .browser-title {
</ins><span class="cx" style="display: block; padding: 0 10px"> left: 109px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.site-icon-crop-preview-homeicon {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.site-icon-preview .app-icon-preview {
</ins><span class="cx" style="display: block; padding: 0 10px"> background-color: #000;
</span><span class="cx" style="display: block; padding: 0 10px"> -webkit-border-radius: 16px;
</span><span class="cx" style="display: block; padding: 0 10px"> border-radius: 16px;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,24 +34,3 @@
</span><span class="cx" style="display: block; padding: 0 10px"> overflow: hidden;
</span><span class="cx" style="display: block; padding: 0 10px"> width: 64px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
-.site-icon-crop-shell .submit {
- clear: both;
-}
-
-@media only screen and (max-width: 768px) {
- .site-icon-crop-wrapper,
- .site-icon-crop-preview-shell {
- float: none;
- }
-
- .site-icon-crop-wrapper {
- max-width: 100%;
- margin-bottom: 20px;
- }
-
- .site-icon-crop-wrapper img {
- max-width: 100%;
- height: auto;
- }
-}
</del></span></pre></div>
<a id="trunksrcwpadminincludesclasswpsiteiconphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-site-icon.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-site-icon.php 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-admin/includes/class-wp-site-icon.php 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -65,372 +65,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @access public
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function __construct() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- // Add the favicon to the backend.
- add_action( 'admin_menu', array( $this, 'admin_menu_upload_site_icon' ) );
-
- add_action( 'admin_action_set_site_icon', array( $this, 'set_site_icon' ) );
- add_action( 'admin_action_remove_site_icon', array( $this, 'remove_site_icon' ) );
-
</del><span class="cx" style="display: block; padding: 0 10px"> add_action( 'delete_attachment', array( $this, 'delete_attachment_data' ), 10, 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'get_post_metadata', array( $this, 'get_post_metadata' ), 10, 4 );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Adds a hidden upload page.
- *
- * There is no need to access it directly.
- *
- * @since 4.3.0
- * @access public
- */
- public function admin_menu_upload_site_icon() {
- $hook = add_submenu_page( null, __( 'Site Icon' ), __( 'Site Icon' ), 'manage_options', 'site-icon', array( $this, 'upload_site_icon_page' ) );
-
- add_action( "load-$hook", array( $this, 'add_upload_settings' ) );
- add_action( "load-$hook", array( $this, 'maybe_skip_cropping' ) );
- add_action( "admin_print_scripts-$hook", array( $this, 'enqueue_scripts' ) );
- }
-
- /**
- * Adds scripts to admin settings pages.
- *
- * @since 4.3.0
- * @access public
- */
- public function enqueue_scripts() {
- wp_enqueue_style( 'jcrop' );
- wp_enqueue_script( 'site-icon-crop' );
- }
-
- /**
- * Loads the settings when the admin is initialized.
- *
- * @since 4.3.0
- * @access public
- */
- public function add_upload_settings() {
- add_settings_section( 'site-icon-upload', false, false, 'site-icon-upload' );
- add_settings_field( 'site-icon-upload', __( 'Upload Image' ), array( $this, 'upload_field' ), 'site-icon-upload', 'site-icon-upload', array(
- 'label_for' => 'site-icon-upload',
- ) );
- }
-
- /**
- * Removes the site icon.
- *
- * @since 4.3.0
- * @access public
- */
- public function remove_site_icon() {
- check_admin_referer( 'remove-site-icon' );
-
- $this->delete_site_icon();
-
- add_settings_error( 'site-icon', 'icon-removed', __( 'Site Icon removed.' ), 'updated' );
- }
-
- /**
- * Handle uploading a site icon.
- *
- * Uploading a site_icon is a 3 step process
- *
- * 1. Select the file to upload
- * 2. Crop the file
- * 3. Confirmation
- *
- * @since 4.3.0
- * @access public
- */
- public function upload_site_icon_page() {
- $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'select_site_icon';
-
- switch ( $action ) {
- case 'select_site_icon':
- $this->select_page();
- break;
-
- case 'crop_site_icon':
- $this->crop_page();
- break;
-
- default:
- wp_safe_redirect( admin_url( 'options-general.php#site-icon' ) );
- exit;
- }
- }
-
- /**
- * Displays the site_icon form to upload the image.
- *
- * @since 4.3.0
- * @access public
- */
- public function select_page() {
- ?>
- <div class="wrap">
- <h1><?php _e( 'Add Site Icon' ); ?></h1>
- <?php settings_errors( 'site-icon' ); ?>
- <?php do_settings_sections( 'site-icon-upload' ); ?>
- </div>
- <?php
- }
-
- /**
- * Handles settings field for file upload.
- *
- * @since 4.3.0
- * @access public
- */
- public function upload_field() {
- wp_enqueue_media();
- wp_enqueue_script( 'site-icon' );
- wp_dequeue_script( 'site-icon-crop' );
-
- $update_url = esc_url( add_query_arg( array(
- 'page' => 'site-icon',
- 'action' => 'crop_site_icon',
- ), wp_nonce_url( admin_url( 'options-general.php' ), 'crop-site-icon' ) ) );
- ?>
- <p class="hide-if-no-js">
- <label class="screen-reader-text" for="choose-from-library-link"><?php _e( 'Choose an image from your media library:' ); ?></label>
- <button type="button" id="choose-from-library-link" class="button" data-size="<?php echo absint( $this->min_size ); ?>" data-update-link="<?php echo esc_attr( $update_url ); ?>" data-choose="<?php esc_attr_e( 'Choose a Site Icon' ); ?>" data-update="<?php esc_attr_e( 'Set as Site Icon' ); ?>"><?php _e( 'Choose Image' ); ?></button>
- </p>
- <form class="hide-if-js" action="<?php echo esc_url( admin_url( 'options-general.php?page=site-icon' ) ); ?>" method="post" enctype="multipart/form-data">
- <input name="action" value="crop_site_icon" type="hidden" />
- <input name="site-icon" type="file" />
- <input name="submit" value="<?php esc_attr_e( 'Upload Image' ); ?>" type="submit" class="button button-primary" />
- <p class="description">
- <?php printf( __( 'The image is recommended to be a square image of at least %spx in both width and height.' ), "<strong>$this->min_size</strong>" ); ?>
- </p>
- <?php wp_nonce_field( 'crop-site-icon' ); ?>
- </form>
- <?php
- }
-
- /**
- * Checks if the image needs cropping.
- *
- * If it doesn't need cropping, proceed to set the icon.
- *
- * @since 4.3.0
- * @access public
- */
- public function maybe_skip_cropping() {
- if ( empty( $_REQUEST['action'] ) || 'crop_site_icon' !== $_REQUEST['action'] ) {
- return;
- }
-
- check_admin_referer( 'crop-site-icon' );
-
- list( $attachment_id, $url, $image_size ) = $this->get_upload_data();
-
- if ( $image_size[0] == $image_size[1] && $image_size[0] == $this->min_size ) {
- // No cropping required.
-
- $url = add_query_arg( array(
- 'attachment_id' => $attachment_id,
- 'skip-cropping' => true,
- 'create-new-attachment' => true,
- 'action' => 'set_site_icon',
- ), wp_nonce_url( admin_url( 'options-general.php' ), 'set-site-icon' ) );
-
- wp_safe_redirect( $url );
- die();
- }
- }
-
- /**
- * Handles the image crop admin view.
- *
- * @since 4.3.0
- * @access public
- */
- public function crop_page() {
- check_admin_referer( 'crop-site-icon' );
-
- list( $attachment_id, $url, $image_size ) = $this->get_upload_data();
-
- if ( $image_size[0] < $this->min_size ) {
- add_settings_error( 'site-icon', 'too-small', sprintf( __( 'The selected image is smaller than %upx in width.' ), $this->min_size ) );
-
- // back to step one
- $this->select_page();
-
- return;
- }
-
- if ( $image_size[1] < $this->min_size ) {
- add_settings_error( 'site-icon', 'too-small', sprintf( __( 'The selected image is smaller than %upx in height.' ), $this->min_size ) );
-
- // Back to step one.
- $this->select_page();
-
- return;
- }
-
- wp_localize_script( 'site-icon-crop', 'wpSiteIconCropData', array(
- 'init_x' => 0,
- 'init_y' => 0,
- 'init_size' => $this->min_size,
- 'min_size' => $this->min_size,
- 'width' => $image_size[0],
- 'height' => $image_size[1],
- ) );
- ?>
-
- <div class="wrap">
- <h1 class="site-icon-title"><?php _e( 'Site Icon' ); ?></h1>
- <?php settings_errors( 'site-icon' ); ?>
-
- <div class="site-icon-crop-shell">
- <form action="options-general.php" method="post" enctype="multipart/form-data">
- <p class="hide-if-no-js description"><?php _e('Choose the part of the image you want to use as your site icon.'); ?></p>
- <p class="hide-if-js description"><strong><?php _e( 'You need JavaScript to choose a part of the image.'); ?></strong></p>
-
- <div class="site-icon-crop-wrapper">
- <img src="<?php echo esc_url( $url ); ?>" id="crop-image" class="site-icon-crop-image" width="512" height="" alt="<?php esc_attr_e( 'Image to be cropped' ); ?>"/>
- </div>
-
- <div class="site-icon-crop-preview-shell hide-if-no-js">
- <h2><?php _e( 'Preview' ); ?></h2>
- <strong><?php _e( 'As a browser icon' ); ?></strong>
- <div class="site-icon-crop-favicon-preview-shell">
- <img src="images/browser.png" class="site-icon-browser-preview" width="182" height="" alt=""/>
-
- <div class="site-icon-crop-preview-favicon">
- <img src="<?php echo esc_url( $url ); ?>" id="preview-favicon" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
- </div>
- <span class="site-icon-browser-title"><?php bloginfo( 'name' ); ?></span>
- </div>
-
- <strong><?php _e( 'As an app icon' ); ?></strong>
- <div class="site-icon-crop-preview-homeicon">
- <img src="<?php echo esc_url( $url ); ?>" id="preview-homeicon" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
- </div>
- </div>
-
- <input type="hidden" id="crop-x" name="crop-x" value="0" />
- <input type="hidden" id="crop-y" name="crop-y" value="0" />
- <input type="hidden" id="crop-width" name="crop-w" value="<?php echo esc_attr( $this->min_size ); ?>" />
- <input type="hidden" id="crop-height" name="crop-h" value="<?php echo esc_attr( $this->min_size ); ?>" />
-
- <input type="hidden" name="action" value="set_site_icon" />
- <input type="hidden" name="attachment_id" value="<?php echo esc_attr( $attachment_id ); ?>" />
- <?php if ( empty( $_POST ) && isset( $_GET['file'] ) ) : ?>
- <input type="hidden" name="create-new-attachment" value="true" />
- <?php endif; ?>
- <?php wp_nonce_field( 'set-site-icon' ); ?>
-
- <p class="submit">
- <?php submit_button( __( 'Crop and Publish' ), 'primary hide-if-no-js', 'submit', false ); ?>
- <?php submit_button( __( 'Publish' ), 'primary hide-if-js', 'submit', false ); ?>
- <a class="button secondary" href="options-general.php"><?php _e( 'Cancel' ); ?></a>
- </p>
- </form>
- </div>
- </div>
- <?php
- }
-
- /**
- * Handles saving a new Site Icon.
- *
- * @since 4.3.0
- * @access public
- */
- public function set_site_icon() {
- check_admin_referer( 'set-site-icon' );
-
- $attachment_id = absint( $_REQUEST['attachment_id'] );
- $create_new_attachement = ! empty( $_REQUEST['create-new-attachment'] );
-
- // If the current attachment as been set as site icon don't delete it.
- if ( get_option( 'site_icon' ) == $attachment_id ) {
- // Get the file path.
- $image_url = get_attached_file( $attachment_id );
-
- // Update meta data and possibly regenerate intermediate sizes.
- add_filter( 'intermediate_image_sizes_advanced', array( $this, 'additional_sizes' ) );
- $this->update_attachment_metadata( $attachment_id, $image_url );
- remove_filter( 'intermediate_image_sizes_advanced', array( $this, 'additional_sizes' ) );
-
- } else {
- // Delete any existing site icon images.
- $this->delete_site_icon();
-
- if ( empty( $_REQUEST['skip-cropping'] ) ) {
- $cropped = wp_crop_image( $attachment_id, $_REQUEST['crop-x'], $_REQUEST['crop-y'], $_REQUEST['crop-w'], $_REQUEST['crop-h'], $this->min_size, $this->min_size );
-
- } elseif ( $create_new_attachement ) {
- $cropped = _copy_image_file( $attachment_id );
-
- } else {
- $cropped = get_attached_file( $attachment_id );
- }
-
- if ( ! $cropped || is_wp_error( $cropped ) ) {
- wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) );
- }
-
- $object = $this->create_attachment_object( $cropped, $attachment_id );
-
- if ( $create_new_attachement ) {
- unset( $object['ID'] );
- }
-
- // Update the attachment.
- add_filter( 'intermediate_image_sizes_advanced', array( $this, 'additional_sizes' ) );
- $attachment_id = $this->insert_attachment( $object, $cropped );
- remove_filter( 'intermediate_image_sizes_advanced', array( $this, 'additional_sizes' ) );
-
- // Save the site_icon data into option
- update_option( 'site_icon', $attachment_id );
- }
-
- add_settings_error( 'site-icon', 'icon-updated', __( 'Site Icon updated.' ), 'updated' );
- }
-
- /**
- * Handles uploading the file to be cropped in the second step.
- *
- * @since 4.3.0
- * @access public
- */
- public function handle_upload() {
- $uploaded_file = $_FILES['site-icon'];
- $file_type = wp_check_filetype_and_ext( $uploaded_file['tmp_name'], $uploaded_file['name'] );
- if ( ! wp_match_mime_types( 'image', $file_type['type'] ) ) {
- wp_die( __( 'The uploaded file is not a valid image. Please try again.' ) );
- }
-
- $file = wp_handle_upload( $uploaded_file, array( 'test_form' => false ) );
-
- if ( isset( $file['error'] ) ) {
- wp_die( $file['error'], __( 'Image Upload Error' ) );
- }
-
- $url = $file['url'];
- $type = $file['type'];
- $file = $file['file'];
- $filename = basename( $file );
-
- // Construct the object array
- $object = array(
- 'post_title' => $filename,
- 'post_content' => $url,
- 'post_mime_type' => $type,
- 'guid' => $url,
- 'context' => 'site-icon',
- );
-
- // Save the data
- $attachment_id = wp_insert_attachment( $object, $file );
-
- return compact( 'attachment_id', 'file', 'filename', 'url', 'type' );
- }
-
- /**
</del><span class="cx" style="display: block; padding: 0 10px"> * Creates an attachment 'object'.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.3.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -565,23 +204,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Deletes all additional image sizes, used for site icons.
- *
- * @since 4.3.0
- * @access public
- *
- * @return bool Whether the site icon was successfully deleted.
- */
- public function delete_site_icon() {
- // We add the filter to make sure that we also delete all the added images.
- add_filter( 'intermediate_image_sizes', array( $this, 'intermediate_image_sizes' ) );
- wp_delete_attachment( get_option( 'site_icon' ), true );
- remove_filter( 'intermediate_image_sizes', array( $this, 'intermediate_image_sizes' ) );
-
- return delete_option( 'site_icon' );
- }
-
- /**
</del><span class="cx" style="display: block; padding: 0 10px"> * Deletes the Site Icon when the image file is deleted.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.3.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -619,32 +241,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return $value;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- /**
- * Gets the data required to work with the uploaded image
- *
- * @since 4.3.0
- * @access private
- *
- * @return array containing the collected data
- */
- private function get_upload_data() {
- if ( isset( $_GET['file'] ) ) {
- $attachment_id = absint( $_GET['file'] );
- $file = get_attached_file( $attachment_id, true );
- $url = wp_get_attachment_image_src( $attachment_id, 'full' );
- $url = $url[0];
- } else {
- $upload = $this->handle_upload();
- $attachment_id = $upload['attachment_id'];
- $file = $upload['file'];
- $url = $upload['url'];
- }
-
- $image_size = getimagesize( $file );
-
- return array( $attachment_id, $url, $image_size );
- }
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpadminjscustomizecontrolsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/js/customize-controls.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/customize-controls.js 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-admin/js/customize-controls.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2038,7 +2038,41 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @augments wp.customize.Class
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> api.SiteIconControl = api.CroppedImageControl.extend({
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Create a media modal select frame, and store it so the instance can be reused when needed.
+ */
+ initFrame: function() {
+ var l10n = _wpMediaViewsL10n;
+
+ this.frame = wp.media({
+ button: {
+ text: l10n.select,
+ close: false
+ },
+ states: [
+ new wp.media.controller.Library({
+ title: this.params.button_labels.frame_title,
+ library: wp.media.query({ type: 'image' }),
+ multiple: false,
+ date: false,
+ priority: 20,
+ suggestedWidth: this.params.width,
+ suggestedHeight: this.params.height
+ }),
+ new wp.media.controller.SiteIconCropper({
+ imgSelectOptions: this.calculateImageSelectOptions,
+ control: this
+ })
+ ]
+ });
+
+ this.frame.on( 'select', this.onSelect, this );
+ this.frame.on( 'cropped', this.onCropped, this );
+ this.frame.on( 'skippedcrop', this.onSkippedCrop, this );
+ },
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Updates the setting and re-renders the control UI.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {object} attachment
</span></span></pre></div>
<a id="trunksrcwpadminjssiteiconcropjs"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/src/wp-admin/js/site-icon-crop.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/site-icon-crop.js 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-admin/js/site-icon-crop.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,53 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/* global wpSiteIconCropData, jQuery */
-(function($) {
- var jcrop_api = {},
- siteIconCrop = {
-
- updateCoords : function ( coords ) {
- $( '#crop-x' ).val( coords.x );
- $( '#crop-y' ).val( coords.y );
- $( '#crop-width' ).val( coords.w );
- $( '#crop-height' ).val( coords.h );
-
- siteIconCrop.showPreview( coords );
- },
-
- showPreview : function( coords ){
- var rx = 64 / coords.w,
- ry = 64 / coords.h,
- preview_rx = 16 / coords.w,
- preview_ry = 16 / coords.h;
-
- $( '#preview-homeicon' ).css({
- width: Math.round(rx * wpSiteIconCropData.width ) + 'px',
- height: Math.round(ry * wpSiteIconCropData.height ) + 'px',
- marginLeft: '-' + Math.round(rx * coords.x) + 'px',
- marginTop: '-' + Math.round(ry * coords.y) + 'px'
- });
-
- $( '#preview-favicon' ).css({
- width: Math.round( preview_rx * wpSiteIconCropData.width ) + 'px',
- height: Math.round( preview_ry * wpSiteIconCropData.height ) + 'px',
- marginLeft: '-' + Math.round( preview_rx * coords.x ) + 'px',
- marginTop: '-' + Math.floor( preview_ry* coords.y ) + 'px'
- });
- },
-
- ready: function() {
- jcrop_api = $.Jcrop( '#crop-image' );
- jcrop_api.setOptions({
- bgColor: 'transparent',
- aspectRatio: 1,
- onSelect: siteIconCrop.updateCoords,
- onChange: siteIconCrop.updateCoords,
- trueSize: [ wpSiteIconCropData.width, wpSiteIconCropData.height ],
- minSize: [ wpSiteIconCropData.min_size, wpSiteIconCropData.min_size ]
- });
- jcrop_api.animateTo([wpSiteIconCropData.init_x, wpSiteIconCropData.init_y, wpSiteIconCropData.init_size, wpSiteIconCropData.init_size]);
- }
-
- };
-
- siteIconCrop.ready();
-
-})(jQuery);
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpadminjssiteiconjs"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: trunk/src/wp-admin/js/site-icon.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/site-icon.js 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-admin/js/site-icon.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,50 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-(function($) {
- var frame;
-
- $( function() {
- // Build the choose from library frame.
- $( '#choose-from-library-link' ).on( 'click', function( event ) {
- var $el = $(this);
- event.preventDefault();
-
- // If the media frame already exists, reopen it.
- if ( frame ) {
- frame.open();
- return;
- }
-
- // Create the media frame.
- frame = wp.media({
- // Customize the submit button.
- button: {
- // Set the text of the button.
- text: $el.data('update'),
- // Tell the button not to close the modal, since we're
- // going to refresh the page when the image is selected.
- close: false
- },
- states: [
- new wp.media.controller.Library({
- title: $el.data( 'choose' ),
- library: wp.media.query({ type: 'image' }),
- date: false,
- suggestedWidth: $el.data( 'size' ),
- suggestedHeight: $el.data( 'size' )
- })
- ]
- });
-
- // When an image is selected, run a callback.
- frame.on( 'select', function() {
- // Grab the selected attachment.
- var attachment = frame.state().get('selection').first(),
- link = $el.data('updateLink');
-
- // Tell the browser to navigate to the crop step.
- window.location = link + '&file=' + attachment.id;
- });
-
- frame.open();
- });
- });
-}(jQuery));
</del></span></pre></div>
<a id="trunksrcwpadminoptionsgeneralphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/options-general.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/options-general.php 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-admin/options-general.php 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -124,46 +124,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <td><input name="blogdescription" type="text" id="blogdescription" aria-describedby="tagline-description" value="<?php form_option('blogdescription'); ?>" class="regular-text" />
</span><span class="cx" style="display: block; padding: 0 10px"> <p class="description" id="tagline-description"><?php _e( 'In a few words, explain what this site is about.' ) ?></p></td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<tr>
-<th scope="row"><?php _e( 'Site Icon' ); ?></th>
-<td>
- <?php
- $upload_url = admin_url( 'options-general.php?page=site-icon' );
- $update_url = esc_url( add_query_arg( array(
- 'page' => 'site-icon',
- 'action' => 'crop_site_icon',
- ), wp_nonce_url( admin_url( 'options-general.php' ), 'crop-site-icon' ) ) );
-
- wp_enqueue_media();
- wp_enqueue_script( 'site-icon' );
-
- if ( has_site_icon() ) :
- $remove_url = add_query_arg( array(
- 'action' => 'remove_site_icon',
- ), wp_nonce_url( admin_url( 'options-general.php' ), 'remove-site-icon' ) );
- ?>
-
- <img class="avatar avatar-150" src="<?php site_icon_url( null, 150 ); ?>" height="150" width="150" alt="" />
- <p class="hide-if-no-js">
- <button type="button" id="choose-from-library-link" class="button" data-size="<?php echo absint( $GLOBALS['wp_site_icon']->min_size ); ?>" data-update-link="<?php echo esc_attr( $update_url ); ?>" data-choose="<?php esc_attr_e( 'Choose a Site Icon' ); ?>" data-update="<?php esc_attr_e( 'Set as Site Icon' ); ?>"><?php _e( 'Update Site Icon' ); ?></button>
- <a href="<?php echo esc_url( $remove_url ); ?>"><?php _e( 'Remove Site Icon' ); ?></a>
- </p>
- <p class="hide-if-js">
- <a href="<?php echo esc_url( $upload_url ); ?>" class="button"><?php _e( 'Update Site Icon' ); ?></a>
- <a href="<?php echo esc_url( $remove_url ); ?>"><?php _e( 'Remove Site Icon' ); ?></a>
- </p>
-
- <?php else : ?>
-
- <p class="hide-if-no-js">
- <button type="button" id="choose-from-library-link" class="button" data-size="<?php echo absint( $GLOBALS['wp_site_icon']->min_size ); ?>" data-update-link="<?php echo esc_attr( $update_url ); ?>" data-choose="<?php esc_attr_e( 'Choose a Site Icon' ); ?>" data-update="<?php esc_attr_e( 'Set as Site Icon' ); ?>" aria-label="<?php esc_attr_e( 'Choose an image from your media library' ); ?>" aria-describedby="site-icon-description"><?php _e( 'Choose Image' ); ?></button>
- </p>
- <a class="button hide-if-js" href="<?php echo esc_url( $upload_url ); ?>"><?php _e( 'Add a Site Icon' ); ?></a>
-
- <?php endif; ?>
- <p id="site-icon-description" class="description"><?php _e( 'The Site Icon is used as a browser and app icon for your site.' ); ?></p>
-</td>
-</tr>
</del><span class="cx" style="display: block; padding: 0 10px"> <?php if ( !is_multisite() ) { ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <tr>
</span><span class="cx" style="display: block; padding: 0 10px"> <th scope="row"><label for="siteurl"><?php _e('WordPress Address (URL)') ?></label></th>
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpcustomizemanagerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-customize-manager.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-customize-manager.php 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-includes/class-wp-customize-manager.php 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1357,9 +1357,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'section' => 'title_tagline',
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $icon = wp_get_attachment_image_src( absint( get_option( 'site_icon' ) ), 'full' );
</del><span class="cx" style="display: block; padding: 0 10px"> $this->add_setting( 'site_icon', array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'default' => $icon[0] ? $icon[0] : '',
</del><span class="cx" style="display: block; padding: 0 10px"> 'type' => 'option',
</span><span class="cx" style="display: block; padding: 0 10px"> 'capability' => 'manage_options',
</span><span class="cx" style="display: block; padding: 0 10px"> 'transport' => 'postMessage', // Previewed with JS in the Customizer controls window.
</span></span></pre></div>
<a id="trunksrcwpincludescssmediaviewscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/css/media-views.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/css/media-views.css 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-includes/css/media-views.css 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -696,6 +696,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> height: 100%;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.wp-customizer:not(.mobile) .media-frame-content .crop-content.site-icon {
+ margin-right: 300px;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .media-frame-content .crop-content .crop-image {
</span><span class="cx" style="display: block; padding: 0 10px"> display: block;
</span><span class="cx" style="display: block; padding: 0 10px"> margin: auto;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2475,14 +2479,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> @media only screen and (max-width: 480px) {
</span><span class="cx" style="display: block; padding: 0 10px"> .media-modal-close {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- top: 5px;
- right: 5px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ top: -5px;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .media-modal .media-frame-title {
</span><span class="cx" style="display: block; padding: 0 10px"> height: 40px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ .wp-core-ui.wp-customizer .media-button {
+ margin-top: 13px;
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .media-modal .media-frame-title h1,
</span><span class="cx" style="display: block; padding: 0 10px"> .media-frame:not(.hide-menu) .media-frame-title h1 {
</span><span class="cx" style="display: block; padding: 0 10px"> font-size: 18px;
</span></span></pre></div>
<a id="trunksrcwpincludesjscustomizeviewsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/customize-views.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/customize-views.js 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-includes/js/customize-views.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,27 +4,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> var api = wp.customize;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Use a custom ajax action for cropped image controls.
- */
- wp.media.controller.customizeImageCropper = wp.media.controller.Cropper.extend( {
- doCrop: function( attachment ) {
- var cropDetails = attachment.get( 'cropDetails' ),
- control = this.get( 'control' );
-
- cropDetails.dst_width = control.params.width;
- cropDetails.dst_height = control.params.height;
-
- return wp.ajax.post( 'crop-image', {
- wp_customize: 'on',
- nonce: attachment.get( 'nonces' ).edit,
- id: attachment.get( 'id' ),
- context: control.id,
- cropDetails: cropDetails
- } );
- }
- } );
-
- /**
</del><span class="cx" style="display: block; padding: 0 10px"> * wp.customize.HeaderTool.CurrentView
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Displays the currently selected header image, or a placeholder in lack
</span></span></pre></div>
<a id="trunksrcwpincludesjsimgareaselectjqueryimgareaselectjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/imgareaselect/jquery.imgareaselect.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/imgareaselect/jquery.imgareaselect.js 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-includes/js/imgareaselect/jquery.imgareaselect.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,6 +1,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * imgAreaSelect jQuery plugin
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * version 0.9.10
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * version 0.9.10-monkey
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Copyright (c) 2008-2013 Michal Wojciechowski (odyniec.net)
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -189,7 +189,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return Viewport X
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function evX(event) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return event.pageX - parOfs.left;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return max(event.pageX || 0, touchCoords(event).x) - parOfs.left;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -200,10 +200,26 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return Viewport Y
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function evY(event) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return event.pageY - parOfs.top;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return max(event.pageY || 0, touchCoords(event).y) - parOfs.top;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Get X and Y coordinates of a touch event
+ *
+ * @param event
+ * The event object
+ * @return Coordinates object
+ */
+ function touchCoords(event) {
+ var oev = event.originalEvent || {};
+
+ if (oev.touches && oev.touches.length)
+ return { x: oev.touches[0].pageX, y: oev.touches[0].pageY };
+ else
+ return { x: 0, y: 0 };
+ }
+
+ /**
</ins><span class="cx" style="display: block; padding: 0 10px"> * Get the current selection
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param noScale
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -486,8 +502,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if (options.autoHide || selection.width * selection.height == 0)
</span><span class="cx" style="display: block; padding: 0 10px"> hide($box.add($outer), function () { $(this).hide(); });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $(document).unbind('mousemove', selectingMouseMove);
- $box.mousemove(areaMouseMove);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $(document).off('mousemove touchmove', selectingMouseMove);
+ $box.on('mousemove touchmove', areaMouseMove);
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> options.onSelectEnd(img, getSelection());
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -500,8 +516,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return false
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function areaMouseDown(event) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if (event.which != 1) return false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if (event.type == 'mousedown' && event.which != 1) return false;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * With mobile browsers, there is no "moving the pointer over" action,
+ * so we need to simulate one mousemove event happening prior to
+ * mousedown/touchstart.
+ */
+ areaMouseMove(event);
+
</ins><span class="cx" style="display: block; padding: 0 10px"> adjust();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if (resize) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -511,22 +534,22 @@
</span><span class="cx" style="display: block; padding: 0 10px"> x1 = viewX(selection[/w/.test(resize) ? 'x2' : 'x1']);
</span><span class="cx" style="display: block; padding: 0 10px"> y1 = viewY(selection[/n/.test(resize) ? 'y2' : 'y1']);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $(document).mousemove(selectingMouseMove)
- .one('mouseup', docMouseUp);
- $box.unbind('mousemove', areaMouseMove);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $(document).on('mousemove touchmove', selectingMouseMove)
+ .one('mouseup touchend', docMouseUp);
+ $box.off('mousemove touchmove', areaMouseMove);
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> else if (options.movable) {
</span><span class="cx" style="display: block; padding: 0 10px"> startX = left + selection.x1 - evX(event);
</span><span class="cx" style="display: block; padding: 0 10px"> startY = top + selection.y1 - evY(event);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $box.unbind('mousemove', areaMouseMove);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $box.off('mousemove touchmove', areaMouseMove);
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $(document).mousemove(movingMouseMove)
- .one('mouseup', function () {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $(document).on('mousemove touchmove', movingMouseMove)
+ .one('mouseup touchend', function () {
</ins><span class="cx" style="display: block; padding: 0 10px"> options.onSelectEnd(img, getSelection());
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $(document).unbind('mousemove', movingMouseMove);
- $box.mousemove(areaMouseMove);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $(document).off('mousemove touchmove', movingMouseMove);
+ $box.on('mousemove touchmove', areaMouseMove);
</ins><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> else
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -676,7 +699,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Start selection
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function startSelection() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $(document).unbind('mousemove', startSelection);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $(document).off('mousemove touchmove', startSelection);
</ins><span class="cx" style="display: block; padding: 0 10px"> adjust();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> x2 = x1;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -691,9 +714,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> shown = true;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $(document).unbind('mouseup', cancelSelection)
- .mousemove(selectingMouseMove).one('mouseup', docMouseUp);
- $box.unbind('mousemove', areaMouseMove);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $(document).off('mouseup touchend', cancelSelection)
+ .on('mousemove touchmove', selectingMouseMove)
+ .one('mouseup touchend', docMouseUp);
+ $box.off('mousemove touchmove', areaMouseMove);
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> options.onSelectStart(img, getSelection());
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -702,8 +726,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Cancel selection
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function cancelSelection() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $(document).unbind('mousemove', startSelection)
- .unbind('mouseup', cancelSelection);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $(document).off('mousemove touchmove', startSelection)
+ .off('mouseup touchend', cancelSelection);
</ins><span class="cx" style="display: block; padding: 0 10px"> hide($box.add($outer));
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> setSelection(selX(x1), selY(y1), selX(x1), selY(y1));
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -731,7 +755,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> startY = y1 = evY(event);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /* Selection will start when the mouse is moved */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $(document).mousemove(startSelection).mouseup(cancelSelection);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $(document).on({ 'mousemove touchmove': startSelection,
+ 'mouseup touchend': cancelSelection });
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -989,20 +1014,22 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if (options.disable || options.enable === false) {
</span><span class="cx" style="display: block; padding: 0 10px"> /* Disable the plugin */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $box.unbind('mousemove', areaMouseMove).unbind('mousedown', areaMouseDown);
- $(window).unbind('resize', windowResize);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $box.off({ 'mousemove touchmove': areaMouseMove,
+ 'mousedown touchstart': areaMouseDown });
+ $(window).off('resize', windowResize);
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> else {
</span><span class="cx" style="display: block; padding: 0 10px"> if (options.enable || options.disable === false) {
</span><span class="cx" style="display: block; padding: 0 10px"> /* Enable the plugin */
</span><span class="cx" style="display: block; padding: 0 10px"> if (options.resizable || options.movable)
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $box.mousemove(areaMouseMove).mousedown(areaMouseDown);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $box.on({ 'mousemove touchmove': areaMouseMove,
+ 'mousedown touchstart': areaMouseDown });
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $(window).resize(windowResize);
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if (!options.persistent)
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $img.add($outer).mousedown(imgMouseDown);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $img.add($outer).on('mousedown touchstart', imgMouseDown);
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> options.enable = options.disable = undefined;
</span></span></pre></div>
<a id="trunksrcwpincludesjsimgareaselectjqueryimgareaselectminjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-includes/js/imgareaselect/jquery.imgareaselect.min.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1 +1 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-(function($){var abs=Math.abs,max=Math.max,min=Math.min,round=Math.round;function div(){return $('<div/>')}$.imgAreaSelect=function(img,options){var $img=$(img),imgLoaded,$box=div(),$area=div(),$border=div().add(div()).add(div()).add(div()),$outer=div().add(div()).add(div()).add(div()),$handles=$([]),$areaOpera,left,top,imgOfs={left:0,top:0},imgWidth,imgHeight,$parent,parOfs={left:0,top:0},zIndex=0,position='absolute',startX,startY,scaleX,scaleY,resize,minWidth,minHeight,maxWidth,maxHeight,aspectRatio,shown,x1,y1,x2,y2,selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0},docElem=document.documentElement,ua=navigator.userAgent,$p,d,i,o,w,h,adjusted;function viewX(x){return x+imgOfs.left-parOfs.left}function viewY(y){return y+imgOfs.top-parOfs.top}function selX(x){return x-imgOfs.left+parOfs.left}function selY(y){return y-imgOfs.top+parOfs.top}function evX(event){return event.pageX-parOf
s.left}function evY(event){return event.pageY-parOfs.top}function getSelection(noScale){var sx=noScale||scaleX,sy=noScale||scaleY;return{x1:round(selection.x1*sx),y1:round(selection.y1*sy),x2:round(selection.x2*sx),y2:round(selection.y2*sy),width:round(selection.x2*sx)-round(selection.x1*sx),height:round(selection.y2*sy)-round(selection.y1*sy)}}function setSelection(x1,y1,x2,y2,noScale){var sx=noScale||scaleX,sy=noScale||scaleY;selection={x1:round(x1/sx||0),y1:round(y1/sy||0),x2:round(x2/sx||0),y2:round(y2/sy||0)};selection.width=selection.x2-selection.x1;selection.height=selection.y2-selection.y1}function adjust(){if(!imgLoaded||!$img.width())return;imgOfs={left:round($img.offset().left),top:round($img.offset().top)};imgWidth=$img.innerWidth();imgHeight=$img.innerHeight();imgOfs.top+=($img.outerHeight()-imgHeight)>>1;imgOfs.left+=($img.outerWidth()-imgWidth)>>1;minWidth=round(options.minWidth/scaleX)||0;minHeight=round(options.minHeight/scaleY)||0;maxWidth=round(min(opt
ions.maxWidth/scaleX||1<<24,imgWidth));maxHeight=round(min(options.maxHeight/scaleY||1<<24,imgHeight));if($().jquery=='1.3.2'&&position=='fixed'&&!docElem['getBoundingClientRect']){imgOfs.top+=max(document.body.scrollTop,docElem.scrollTop);imgOfs.left+=max(document.body.scrollLeft,docElem.scrollLeft)}parOfs=/absolute|relative/.test($parent.css('position'))?{left:round($parent.offset().left)-$parent.scrollLeft(),top:round($parent.offset().top)-$parent.scrollTop()}:position=='fixed'?{left:$(document).scrollLeft(),top:$(document).scrollTop()}:{left:0,top:0};left=viewX(0);top=viewY(0);if(selection.x2>imgWidth||selection.y2>imgHeight)doResize()}function update(resetKeyPress){if(!shown)return;$box.css({left:viewX(selection.x1),top:viewY(selection.y1)}).add($area).width(w=selection.width).height(h=selection.height);$area.add($border).add($handles).css({left:0,top:0});$border.width(max(w-$border.outerWidth()+$border.innerWidth(),0)).height(max(h-$border.out
erHeight()+$border.innerHeight(),0));$($outer[0]).css({left:left,top:top,width:selection.x1,height:imgHeight});$($outer[1]).css({left:left+selection.x1,top:top,width:w,height:selection.y1});$($outer[2]).css({left:left+selection.x2,top:top,width:imgWidth-selection.x2,height:imgHeight});$($outer[3]).css({left:left+selection.x1,top:top+selection.y2,width:w,height:imgHeight-selection.y2});w-=$handles.outerWidth();h-=$handles.outerHeight();switch($handles.length){case 8:$($handles[4]).css({left:w>>1});$($handles[5]).css({left:w,top:h>>1});$($handles[6]).css({left:w>>1,top:h});$($handles[7]).css({top:h>>1});case 4:$handles.slice(1,3).css({left:w});$handles.slice(2,4).css({top:h})}if(resetKeyPress!==false){if($.imgAreaSelect.onKeyPress!=docKeyPress)$(document).unbind($.imgAreaSelect.keyPress,$.imgAreaSelect.onKeyPress);if(options.keys)$(document)[$.imgAreaSelect.keyPress]($.imgAreaSelect.onKeyPress=docKeyPress)}if(msie&&$border.outerWidth()-$border.innerWidt
h()==2){$border.css('margin',0);setTimeout(function(){$border.css('margin','auto')},0)}}function doUpdate(resetKeyPress){adjust();update(resetKeyPress);x1=viewX(selection.x1);y1=viewY(selection.y1);x2=viewX(selection.x2);y2=viewY(selection.y2)}function hide($elem,fn){options.fadeSpeed?$elem.fadeOut(options.fadeSpeed,fn):$elem.hide()}function areaMouseMove(event){var x=selX(evX(event))-selection.x1,y=selY(evY(event))-selection.y1;if(!adjusted){adjust();adjusted=true;$box.one('mouseout',function(){adjusted=false})}resize='';if(options.resizable){if(y<=options.resizeMargin)resize='n';else if(y>=selection.height-options.resizeMargin)resize='s';if(x<=options.resizeMargin)resize+='w';else if(x>=selection.width-options.resizeMargin)resize+='e'}$box.css('cursor',resize?resize+'-resize':options.movable?'move':'');if($areaOpera)$areaOpera.toggle()}function docMouseUp(event){$('body').css('cursor','');if(options.autoHide||selection.width*selection.height==0)hide($box.add($outer),fu
nction(){$(this).hide()});$(document).unbind('mousemove',selectingMouseMove);$box.mousemove(areaMouseMove);options.onSelectEnd(img,getSelection())}function areaMouseDown(event){if(event.which!=1)return false;adjust();if(resize){$('body').css('cursor',resize+'-resize');x1=viewX(selection[/w/.test(resize)?'x2':'x1']);y1=viewY(selection[/n/.test(resize)?'y2':'y1']);$(document).mousemove(selectingMouseMove).one('mouseup',docMouseUp);$box.unbind('mousemove',areaMouseMove)}else if(options.movable){startX=left+selection.x1-evX(event);startY=top+selection.y1-evY(event);$box.unbind('mousemove',areaMouseMove);$(document).mousemove(movingMouseMove).one('mouseup',function(){options.onSelectEnd(img,getSelection());$(document).unbind('mousemove',movingMouseMove);$box.mousemove(areaMouseMove)})}else $img.mousedown(event);return false}function fixAspectRatio(xFirst){if(aspectRatio)if(xFirst){x2=max(left,min(left+imgWidth,x1+abs(y2-y1)*aspectRatio*(x2>x1||-1)));y2=round(max(top,min(top+imgHeight,
y1+abs(x2-x1)/aspectRatio*(y2>y1||-1))));x2=round(x2)}else{y2=max(top,min(top+imgHeight,y1+abs(x2-x1)/aspectRatio*(y2>y1||-1)));x2=round(max(left,min(left+imgWidth,x1+abs(y2-y1)*aspectRatio*(x2>x1||-1))));y2=round(y2)}}function doResize(){x1=min(x1,left+imgWidth);y1=min(y1,top+imgHeight);if(abs(x2-x1)<minWidth){x2=x1-minWidth*(x2<x1||-1);if(x2<left)x1=left+minWidth;else if(x2>left+imgWidth)x1=left+imgWidth-minWidth}if(abs(y2-y1)<minHeight){y2=y1-minHeight*(y2<y1||-1);if(y2<top)y1=top+minHeight;else if(y2>top+imgHeight)y1=top+imgHeight-minHeight}x2=max(left,min(x2,left+imgWidth));y2=max(top,min(y2,top+imgHeight));fixAspectRatio(abs(x2-x1)<abs(y2-y1)*aspectRatio);if(abs(x2-x1)>maxWidth){x2=x1-maxWidth*(x2<x1||-1);fixAspectRatio()}if(abs(y2-y1)>maxHeight){y2=y1-maxHeight*(y2<y1||-1);fixAspectRatio(true)}selection={x1:selX(min(x1,x2)),x2:selX(max(x1,x2)),y1:selY(min(y1,y2)),y2:selY(max(y1,y2)),width:abs(x2-x1),height:abs(y2-y1)};update();o
ptions.onSelectChange(img,getSelection())}function selectingMouseMove(event){x2=/w|e|^$/.test(resize)||aspectRatio?evX(event):viewX(selection.x2);y2=/n|s|^$/.test(resize)||aspectRatio?evY(event):viewY(selection.y2);doResize();return false}function doMove(newX1,newY1){x2=(x1=newX1)+selection.width;y2=(y1=newY1)+selection.height;$.extend(selection,{x1:selX(x1),y1:selY(y1),x2:selX(x2),y2:selY(y2)});update();options.onSelectChange(img,getSelection())}function movingMouseMove(event){x1=max(left,min(startX+evX(event),left+imgWidth-selection.width));y1=max(top,min(startY+evY(event),top+imgHeight-selection.height));doMove(x1,y1);event.preventDefault();return false}function startSelection(){$(document).unbind('mousemove',startSelection);adjust();x2=x1;y2=y1;doResize();resize='';if(!$outer.is(':visible'))$box.add($outer).hide().fadeIn(options.fadeSpeed||0);shown=true;$(document).unbind('mouseup',cancelSelection).mousemove(selectingMouseMove).one('mouseup',docMouseUp);$box.unbind('mousemove',a
reaMouseMove);options.onSelectStart(img,getSelection())}function cancelSelection(){$(document).unbind('mousemove',startSelection).unbind('mouseup',cancelSelection);hide($box.add($outer));setSelection(selX(x1),selY(y1),selX(x1),selY(y1));if(!(this instanceof $.imgAreaSelect)){options.onSelectChange(img,getSelection());options.onSelectEnd(img,getSelection())}}function imgMouseDown(event){if(event.which!=1||$outer.is(':animated'))return false;adjust();startX=x1=evX(event);startY=y1=evY(event);$(document).mousemove(startSelection).mouseup(cancelSelection);return false}function windowResize(){doUpdate(false)}function imgLoad(){imgLoaded=true;setOptions(options=$.extend({classPrefix:'imgareaselect',movable:true,parent:'body',resizable:true,resizeMargin:10,onInit:function(){},onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}},options));$box.add($outer).css({visibility:''});if(options.show){shown=true;adjust();update();$box.add($outer).hide().fadeIn(options.fad
eSpeed||0)}setTimeout(function(){options.onInit(img,getSelection())},0)}var docKeyPress=function(event){var k=options.keys,d,t,key=event.keyCode;d=!isNaN(k.alt)&&(event.altKey||event.originalEvent.altKey)?k.alt:!isNaN(k.ctrl)&&event.ctrlKey?k.ctrl:!isNaN(k.shift)&&event.shiftKey?k.shift:!isNaN(k.arrows)?k.arrows:10;if(k.arrows=='resize'||(k.shift=='resize'&&event.shiftKey)||(k.ctrl=='resize'&&event.ctrlKey)||(k.alt=='resize'&&(event.altKey||event.originalEvent.altKey))){switch(key){case 37:d=-d;case 39:t=max(x1,x2);x1=min(x1,x2);x2=max(t+d,x1);fixAspectRatio();break;case 38:d=-d;case 40:t=max(y1,y2);y1=min(y1,y2);y2=max(t+d,y1);fixAspectRatio(true);break;default:return}doResize()}else{x1=min(x1,x2);y1=min(y1,y2);switch(key){case 37:doMove(max(x1-d,left),y1);break;case 38:doMove(x1,max(y1-d,top));break;case 39:doMove(x1+min(d,imgWidth-selX(x2)),y1);break;case 40:doMove(x1,y1+min(d,imgHeight-selY(y2)));break;default:return}}return false}
;function styleOptions($elem,props){for(var option in props)if(options[option]!==undefined)$elem.css(props[option],options[option])}function setOptions(newOptions){if(newOptions.parent)($parent=$(newOptions.parent)).append($box.add($outer));$.extend(options,newOptions);adjust();if(newOptions.handles!=null){$handles.remove();$handles=$([]);i=newOptions.handles?newOptions.handles=='corners'?4:8:0;while(i--)$handles=$handles.add(div());$handles.addClass(options.classPrefix+'-handle').css({position:'absolute',fontSize:0,zIndex:zIndex+1||1});if(!parseInt($handles.css('width'))>=0)$handles.width(5).height(5);if(o=options.borderWidth)$handles.css({borderWidth:o,borderStyle:'solid'});styleOptions($handles,{borderColor1:'border-color',borderColor2:'background-color',borderOpacity:'opacity'})}scaleX=options.imageWidth/imgWidth||1;scaleY=options.imageHeight/imgHeight||1;if(newOptions.x1!=null){setSelection(newOptions.x1,newOptions.y1,newOptions.x2,newOptions.y2);newOptions.show=!newOptions.
hide}if(newOptions.keys)options.keys=$.extend({shift:1,ctrl:'resize'},newOptions.keys);$outer.addClass(options.classPrefix+'-outer');$area.addClass(options.classPrefix+'-selection');for(i=0;i++<4;)$($border[i-1]).addClass(options.classPrefix+'-border'+i);styleOptions($area,{selectionColor:'background-color',selectionOpacity:'opacity'});styleOptions($border,{borderOpacity:'opacity',borderWidth:'border-width'});styleOptions($outer,{outerColor:'background-color',outerOpacity:'opacity'});if(o=options.borderColor1)$($border[0]).css({borderStyle:'solid',borderColor:o});if(o=options.borderColor2)$($border[1]).css({borderStyle:'dashed',borderColor:o});$box.append($area.add($border).add($areaOpera)).append($handles);if(msie){if(o=($outer.css('filter')||'').match(/opacity=(\d+)/))$outer.css('opacity',o[1]/100);if(o=($border.css('filter')||'').match(/opacity=(\d+)/))$border.css('opacity',o[1]/100)}if(newOptions.hide)hide($box.add($outer));else if(newOptions.show&&imgLoaded){shown=tr
ue;$box.add($outer).fadeIn(options.fadeSpeed||0);doUpdate()}aspectRatio=(d=(options.aspectRatio||'').split(/:/))[0]/d[1];$img.add($outer).unbind('mousedown',imgMouseDown);if(options.disable||options.enable===false){$box.unbind('mousemove',areaMouseMove).unbind('mousedown',areaMouseDown);$(window).unbind('resize',windowResize)}else{if(options.enable||options.disable===false){if(options.resizable||options.movable)$box.mousemove(areaMouseMove).mousedown(areaMouseDown);$(window).resize(windowResize)}if(!options.persistent)$img.add($outer).mousedown(imgMouseDown)}options.enable=options.disable=undefined}this.remove=function(){setOptions({disable:true});$box.add($outer).remove()};this.getOptions=function(){return options};this.setOptions=setOptions;this.getSelection=getSelection;this.setSelection=setSelection;this.cancelSelection=cancelSelection;this.update=doUpdate;var msie=(/msie ([\w.]+)/i.exec(ua)||[])[1],opera=/opera/i.test(ua),safari=/webkit/i.test(ua)&&!/chrome/i.test(ua);$
p=$img;while($p.length){zIndex=max(zIndex,!isNaN($p.css('z-index'))?$p.css('z-index'):zIndex);if($p.css('position')=='fixed')position='fixed';$p=$p.parent(':not(body)')}zIndex=options.zIndex||zIndex;if(msie)$img.attr('unselectable','on');$.imgAreaSelect.keyPress=msie||safari?'keydown':'keypress';if(opera)$areaOpera=div().css({width:'100%',height:'100%',position:'absolute',zIndex:zIndex+2||2});$box.add($outer).css({visibility:'hidden',position:position,overflow:'hidden',zIndex:zIndex||'0'});$box.css({zIndex:zIndex+2||2});$area.add($border).css({position:'absolute',fontSize:0});img.complete||img.readyState=='complete'||!$img.is('img')?imgLoad():$img.one('load',imgLoad);if(!imgLoaded&&msie&&msie>=7)img.src=img.src};$.fn.imgAreaSelect=function(options){options=options||{};this.each(function(){if($(this).data('imgAreaSelect')){if(options.remove){$(this).data('imgAreaSelect').remove();$(this).removeData('imgAreaSelect')}else $(this).data('imgAreaSelect').setOptions(opti
ons)}else if(!options.remove){if(options.enable===undefined&&options.disable===undefined)options.enable=true;$(this).data('imgAreaSelect',new $.imgAreaSelect(this,options))}});if(options.instance)return $(this).data('imgAreaSelect');return this}})(jQuery);
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+!function(e){function t(){return e("<div/>")}var o=Math.abs,i=Math.max,s=Math.min,n=Math.round;e.imgAreaSelect=function(r,c){function d(e){return e+gt.left-vt.left}function a(e){return e+gt.top-vt.top}function u(e){return e-gt.left+vt.left}function l(e){return e-gt.top+vt.top}function h(e){return i(e.pageX||0,m(e).x)-vt.left}function f(e){return i(e.pageY||0,m(e).y)-vt.top}function m(e){var t=e.originalEvent||{};return t.touches&&t.touches.length?{x:t.touches[0].pageX,y:t.touches[0].pageY}:{x:0,y:0}}function p(e){var t=e||B,o=e||Q;return{x1:n(wt.x1*t),y1:n(wt.y1*o),x2:n(wt.x2*t),y2:n(wt.y2*o),width:n(wt.x2*t)-n(wt.x1*t),height:n(wt.y2*o)-n(wt.y1*o)}}function y(e,t,o,i,s){var r=s||B,c=s||Q;wt={x1:n(e/r||0),y1:n(t/c||0),x2:n(o/r||0),y2:n(i/c||0)},wt.width=wt.x2-wt.x1,wt.height=wt.y2-wt.y1}function g(){T&<.width()&&(gt={left:n(lt.offset().left),top:
n(lt.offset().top)},R=lt.innerWidth(),X=lt.innerHeight(),gt.top+=lt.outerHeight()-X>>1,gt.left+=lt.outerWidth()-R>>1,G=n(c.minWidth/B)||0,J=n(c.minHeight/Q)||0,U=n(s(c.maxWidth/B||1<<24,R)),V=n(s(c.maxHeight/Q||1<<24,X)),"1.3.2"!=e().jquery||"fixed"!=xt||St.getBoundingClientRect||(gt.top+=i(document.body.scrollTop,St.scrollTop),gt.left+=i(document.body.scrollLeft,St.scrollLeft)),vt=/absolute|relative/.test(Y.css("position"))?{left:n(Y.offset().left)-Y.scrollLeft(),top:n(Y.offset().top)-Y.scrollTop()}:"fixed"==xt?{left:e(document).scrollLeft(),top:e(document).scrollTop()}:{left:0,top:0},j=d(0),D=a(0),(wt.x2>R||wt.y2>X)&&C())}function v(t){if(_){switch(ht.css({left:d(wt.x1),top:a(wt.y1)}).add(ft).width(dt=wt.width).height(at=wt.height),ft.add(mt).add(yt).css({left:0,top:0}),mt.width(i(dt-mt.outerWidth()+mt.innerWidth(),0)).height(i(at-mt.outerHeight()+mt.innerHeight(),0)),e(pt[0]).css({left:j,top:D,width:wt.
x1,height:X}),e(pt[1]).css({left:j+wt.x1,top:D,width:dt,height:wt.y1}),e(pt[2]).css({left:j+wt.x2,top:D,width:R-wt.x2,height:X}),e(pt[3]).css({left:j+wt.x1,top:D+wt.y2,width:dt,height:X-wt.y2}),dt-=yt.outerWidth(),at-=yt.outerHeight(),yt.length){case 8:e(yt[4]).css({left:dt>>1}),e(yt[5]).css({left:dt,top:at>>1}),e(yt[6]).css({left:dt>>1,top:at}),e(yt[7]).css({top:at>>1});case 4:yt.slice(1,3).css({left:dt}),yt.slice(2,4).css({top:at})}t!==!1&&(e.imgAreaSelect.onKeyPress!=kt&&e(document).unbind(e.imgAreaSelect.keyPress,e.imgAreaSelect.onKeyPress),c.keys&&e(document)[e.imgAreaSelect.keyPress](e.imgAreaSelect.onKeyPress=kt)),Ct&&mt.outerWidth()-mt.innerWidth()==2&&(mt.css("margin",0),setTimeout(function(){mt.css("margin","auto")},0))}}function b(e){g(),v(e),et=d(wt.x1),tt=a(wt.y1),ot=d(wt.x2),it=a(wt.y2)}function x(e,t){c.fadeSpeed?e.fadeOut(c.fadeSpeed,t):e.hide()}function w(e){var t=u(h(e))-w
t.x1,o=l(f(e))-wt.y1;ut||(g(),ut=!0,ht.one("mouseout",function(){ut=!1})),F="",c.resizable&&(o<=c.resizeMargin?F="n":o>=wt.height-c.resizeMargin&&(F="s"),t<=c.resizeMargin?F+="w":t>=wt.width-c.resizeMargin&&(F+="e")),ht.css("cursor",F?F+"-resize":c.movable?"move":""),L&&L.toggle()}function S(){e("body").css("cursor",""),(c.autoHide||wt.width*wt.height==0)&&x(ht.add(pt),function(){e(this).hide()}),e(document).off("mousemove touchmove",A),ht.on("mousemove touchmove",w),c.onSelectEnd(r,p())}function z(t){return"mousedown"==t.type&&1!=t.which?!1:(w(t),g(),F?(e("body").css("cursor",F+"-resize"),et=d(wt[/w/.test(F)?"x2":"x1"]),tt=a(wt[/n/.test(F)?"y2":"y1"]),e(document).on("mousemove touchmove"
,A).one("mouseup touchend",S),ht.off("mousemove touchmove",w)):c.movable?($=j+wt.x1-h(t),q=D+wt.y1-f(t),ht.off("mousemove touchmove",w),e(document).on("mousemove touchmove",I).one("mouseup touchend",function(){c.onSelectEnd(r,p()),e(document).off("mousemove touchmove",I),ht.on("mousemove touchmove",w)})):lt.mousedown(t),!1)}function k(e){Z&&(e?(ot=i(j,s(j+R,et+o(it-tt)*Z*(ot>et||-1))),it=n(i(D,s(D+X,tt+o(ot-et)/Z*(it>tt||-1)))),ot=n(ot)):(it=i(D,s(D+X,tt+o(ot-et)/Z*(it>tt||-1))),ot=n(i(j,s(j+R,et+o(it-tt)*Z*(ot>et||-1)))),it=n(it)))}function C(){et=s(et,j+R),tt=s(tt,D+X),o(ot-et)<G&&(ot=et-G*(et>ot||-1),j>ot?et=j+G:ot>j+R&&(et=j+R-G)),o(it-tt)<J&&(it=tt-J*(tt>it||-1),D>it?tt=D+J:it>D+X&&(tt=D+X-J)),ot=i(j,s(ot,j+R)),it=i(D,s(it,D+X)),k(o(ot-et)<o(it-tt)*Z),o(ot-et)>U&&(ot=et-U*(et>ot||-1),k()),o(it-tt)>V&&(it=tt
-V*(tt>it||-1),k(!0)),wt={x1:u(s(et,ot)),x2:u(i(et,ot)),y1:l(s(tt,it)),y2:l(i(tt,it)),width:o(ot-et),height:o(it-tt)},v(),c.onSelectChange(r,p())}function A(e){return ot=/w|e|^$/.test(F)||Z?h(e):d(wt.x2),it=/n|s|^$/.test(F)||Z?f(e):a(wt.y2),C(),!1}function W(t,o){ot=(et=t)+wt.width,it=(tt=o)+wt.height,e.extend(wt,{x1:u(et),y1:l(tt),x2:u(ot),y2:l(it)}),v(),c.onSelectChange(r,p())}function I(e){return et=i(j,s($+h(e),j+R-wt.width)),tt=i(D,s(q+f(e),D+X-wt.height)),W(et,tt),e.preventDefault(),!1}function K(){e(document).off("mousemove touchmove",K),g(),ot=et,it=tt,C(),F="",pt.is(":visible")||ht.add(pt).hide().fadeIn(c.fadeSpeed||0),_=!0,e(document).off("mouseup touchend",P).on("mousemove touchmove",A).one("mouseup touchend",S),ht.off("mousemove touchmove",w),c.onSelectStart(r,p())}function P(){e(document).off("mousemove touchmove",K).off("mouseup touchend",P),x(ht.add(pt)),y(u(et),l(tt),u(et),l(
tt)),this instanceof e.imgAreaSelect||(c.onSelectChange(r,p()),c.onSelectEnd(r,p()))}function N(t){return 1!=t.which||pt.is(":animated")?!1:(g(),$=et=h(t),q=tt=f(t),e(document).on({"mousemove touchmove":K,"mouseup touchend":P}),!1)}function H(){b(!1)}function M(){T=!0,O(c=e.extend({classPrefix:"imgareaselect",movable:!0,parent:"body",resizable:!0,resizeMargin:10,onInit:function(){},onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}},c)),ht.add(pt).css({visibility:""}),c.show&&(_=!0,g(),v(),ht.add(pt).hide().fadeIn(c.fadeSpeed||0)),setTimeout(function(){c.onInit(r,p())},0)}function E(e,t){for(var o in t)void 0!==c[o]&&e.css(t[o],c[o])}function O(o){if(o.parent&&(Y=e(o.parent)).append(ht.add(pt)),e.extend(c,o),g(),null!=o.handles){for(yt.remove(),yt=e([]),rt=o.handles?"corners"==o.handles?4:8:0;rt--;)yt=yt.add(t());yt.addClass(c.classPrefix+"-handle").cs
s({position:"absolute",fontSize:0,zIndex:bt+1||1}),!parseInt(yt.css("width"))>=0&&yt.width(5).height(5),(ct=c.borderWidth)&&yt.css({borderWidth:ct,borderStyle:"solid"}),E(yt,{borderColor1:"border-color",borderColor2:"background-color",borderOpacity:"opacity"})}for(B=c.imageWidth/R||1,Q=c.imageHeight/X||1,null!=o.x1&&(y(o.x1,o.y1,o.x2,o.y2),o.show=!o.hide),o.keys&&(c.keys=e.extend({shift:1,ctrl:"resize"},o.keys)),pt.addClass(c.classPrefix+"-outer"),ft.addClass(c.classPrefix+"-selection"),rt=0;rt++<4;)e(mt[rt-1]).addClass(c.classPrefix+"-border"+rt);E(ft,{selectionColor:"background-color",selectionOpacity:"opacity"}),E(mt,{borderOpacity:"opacity",borderWidth:"border-width"}),E(pt,{outerColor:"background-color",outerOpacity:"opacity"}),(ct=c.borderColor1)&&e(mt[0]).css({borderStyle:&
quot;solid",borderColor:ct}),(ct=c.borderColor2)&&e(mt[1]).css({borderStyle:"dashed",borderColor:ct}),ht.append(ft.add(mt).add(L)).append(yt),Ct&&((ct=(pt.css("filter")||"").match(/opacity=(\d+)/))&&pt.css("opacity",ct[1]/100),(ct=(mt.css("filter")||"").match(/opacity=(\d+)/))&&mt.css("opacity",ct[1]/100)),o.hide?x(ht.add(pt)):o.show&&T&&(_=!0,ht.add(pt).fadeIn(c.fadeSpeed||0),b()),Z=(nt=(c.aspectRatio||"").split(/:/))[0]/nt[1],lt.add(pt).unbind("mousedown",N),c.disable||c.enable===!1?(ht.off({"mousemove touchmove":w,"mousedown touchstart":z}),e(window).off("resize",H)):((c.enable||c.disable===!1)&&((c.resizable||c.movable)&&ht.on({"mousemove touchmove":w,"mousedown touchstart":z}),e(window).resize(H)),c.persistent||lt.add(pt).on("mousedown touchstart",N)),c.enable=c.
disable=void 0}var T,L,j,D,R,X,Y,$,q,B,Q,F,G,J,U,V,Z,_,et,tt,ot,it,st,nt,rt,ct,dt,at,ut,lt=e(r),ht=t(),ft=t(),mt=t().add(t()).add(t()).add(t()),pt=t().add(t()).add(t()).add(t()),yt=e([]),gt={left:0,top:0},vt={left:0,top:0},bt=0,xt="absolute",wt={x1:0,y1:0,x2:0,y2:0,width:0,height:0},St=document.documentElement,zt=navigator.userAgent,kt=function(e){var t,o,n=c.keys,r=e.keyCode;if(t=isNaN(n.alt)||!e.altKey&&!e.originalEvent.altKey?!isNaN(n.ctrl)&&e.ctrlKey?n.ctrl:!isNaN(n.shift)&&e.shiftKey?n.shift:isNaN(n.arrows)?10:n.arrows:n.alt,"resize"==n.arrows||"resize"==n.shift&&e.shiftKey||"resize"==n.ctrl&&e.ctrlKey||"resize"==n.alt&&(e.altKey||e.originalEvent.altKey)){switch(r){case 37:t=-t;case 39:o=i(et,ot),et=s(et,ot),ot=i(o+t,et),k();break;case 38:t=-t;case 40:o=i(tt,it),tt=s(tt,it),it=i(o+t,tt),k(!0);break;default:return}C()}else switch(et=s(et,ot),tt=s(tt,it),r){case 37:W(i(et-t,j),tt);br
eak;case 38:W(et,i(tt-t,D));break;case 39:W(et+s(t,R-u(ot)),tt);break;case 40:W(et,tt+s(t,X-l(it)));break;default:return}return!1};this.remove=function(){O({disable:!0}),ht.add(pt).remove()},this.getOptions=function(){return c},this.setOptions=O,this.getSelection=p,this.setSelection=y,this.cancelSelection=P,this.update=b;var Ct=(/msie ([\w.]+)/i.exec(zt)||[])[1],At=/opera/i.test(zt),Wt=/webkit/i.test(zt)&&!/chrome/i.test(zt);for(st=lt;st.length;)bt=i(bt,isNaN(st.css("z-index"))?bt:st.css("z-index")),"fixed"==st.css("position")&&(xt="fixed"),st=st.parent(":not(body)");bt=c.zIndex||bt,Ct&<.attr("unselectable","on"),e.imgAreaSelect.keyPress=Ct||Wt?"keydown":"keypress",At&&(L=t().css({width:"100%",height:"100%",position:"absolute",zIndex:bt+2||2})),ht.add(pt).css({visibility:"hidden",position:xt,overflow:"hidde
n",zIndex:bt||"0"}),ht.css({zIndex:bt+2||2}),ft.add(mt).css({position:"absolute",fontSize:0}),r.complete||"complete"==r.readyState||!lt.is("img")?M():lt.one("load",M),!T&&Ct&&Ct>=7&&(r.src=r.src)},e.fn.imgAreaSelect=function(t){return t=t||{},this.each(function(){e(this).data("imgAreaSelect")?t.remove?(e(this).data("imgAreaSelect").remove(),e(this).removeData("imgAreaSelect")):e(this).data("imgAreaSelect").setOptions(t):t.remove||(void 0===t.enable&&void 0===t.disable&&(t.enable=!0),e(this).data("imgAreaSelect",new e.imgAreaSelect(this,t)))}),t.instance?e(this).data("imgAreaSelect"):this}}(jQuery);
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediacontrollerscustomizeimagecropperjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/src/wp-includes/js/media/controllers/customize-image-cropper.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/controllers/customize-image-cropper.js (rev 0)
+++ trunk/src/wp-includes/js/media/controllers/customize-image-cropper.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,34 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/*globals wp */
+
+/**
+ * wp.media.controller.CustomizeImageCropper
+ *
+ * A state for cropping an image.
+ *
+ * @class
+ * @augments wp.media.controller.Cropper
+ * @augments wp.media.controller.State
+ * @augments Backbone.Model
+ */
+var Controller = wp.media.controller,
+ CustomizeImageCropper;
+
+CustomizeImageCropper = Controller.Cropper.extend({
+ doCrop: function( attachment ) {
+ var cropDetails = attachment.get( 'cropDetails' ),
+ control = this.get( 'control' );
+
+ cropDetails.dst_width = control.params.width;
+ cropDetails.dst_height = control.params.height;
+
+ return wp.ajax.post( 'crop-image', {
+ wp_customize: 'on',
+ nonce: attachment.get( 'nonces' ).edit,
+ id: attachment.get( 'id' ),
+ context: control.id,
+ cropDetails: cropDetails
+ } );
+ }
+});
+
+module.exports = CustomizeImageCropper;
</ins></span></pre></div>
<a id="trunksrcwpincludesjsmediacontrollerssiteiconcropperjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/src/wp-includes/js/media/controllers/site-icon-cropper.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/controllers/site-icon-cropper.js (rev 0)
+++ trunk/src/wp-includes/js/media/controllers/site-icon-cropper.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,49 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/*globals wp, Backbone */
+
+/**
+ * wp.media.controller.SiteIconCropper
+ *
+ * A state for cropping a Site Icon.
+ *
+ * @class
+ * @augments wp.media.controller.Cropper
+ * @augments wp.media.controller.State
+ * @augments Backbone.Model
+ */
+var Controller = wp.media.controller,
+ SiteIconCropper;
+
+SiteIconCropper = Controller.Cropper.extend({
+ activate: function() {
+ this.frame.on( 'content:create:crop', this.createCropContent, this );
+ this.frame.on( 'close', this.removeCropper, this );
+ this.set('selection', new Backbone.Collection(this.frame._selection.single));
+ },
+
+ createCropContent: function() {
+ this.cropperView = new wp.media.view.SiteIconCropper({
+ controller: this,
+ attachment: this.get('selection').first()
+ });
+ this.cropperView.on('image-loaded', this.createCropToolbar, this);
+ this.frame.content.set(this.cropperView);
+
+ },
+
+ doCrop: function( attachment ) {
+ var cropDetails = attachment.get( 'cropDetails' ),
+ control = this.get( 'control' );
+
+ cropDetails.dst_width = control.params.width;
+ cropDetails.dst_height = control.params.height;
+
+ return wp.ajax.post( 'crop-image', {
+ nonce: attachment.get( 'nonces' ).edit,
+ id: attachment.get( 'id' ),
+ context: 'site-icon',
+ cropDetails: cropDetails
+ } );
+ }
+});
+
+module.exports = SiteIconCropper;
</ins></span></pre></div>
<a id="trunksrcwpincludesjsmediaviewssiteiconcropperjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/src/wp-includes/js/media/views/site-icon-cropper.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/views/site-icon-cropper.js (rev 0)
+++ trunk/src/wp-includes/js/media/views/site-icon-cropper.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,43 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/*globals wp, _ */
+
+/**
+ * wp.media.view.SiteIconCropper
+ *
+ * Uses the imgAreaSelect plugin to allow a user to crop a Site Icon.
+ *
+ * Takes imgAreaSelect options from
+ * wp.customize.SiteIconControl.calculateImageSelectOptions.
+ *
+ * @class
+ * @augments wp.media.view.Cropper
+ * @augments wp.media.View
+ * @augments wp.Backbone.View
+ * @augments Backbone.View
+ */
+var View = wp.media.view,
+ SiteIconCropper;
+
+SiteIconCropper = View.Cropper.extend({
+ className: 'crop-content site-icon',
+
+ ready: function () {
+ View.Cropper.prototype.ready.apply( this, arguments );
+
+ this.$( '.crop-image' ).on( 'load', _.bind( this.addSidebar, this ) );
+ },
+
+ addSidebar: function() {
+ this.sidebar = new wp.media.view.Sidebar({
+ controller: this.controller
+ });
+
+ this.sidebar.set( 'preview', new wp.media.view.SiteIconPreview({
+ controller: this.controller,
+ attachment: this.options.attachment
+ }) );
+
+ this.controller.cropperView.views.add( this.sidebar );
+ }
+});
+
+module.exports = SiteIconCropper;
</ins></span></pre></div>
<a id="trunksrcwpincludesjsmediaviewssiteiconpreviewjs"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/src/wp-includes/js/media/views/site-icon-preview.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/views/site-icon-preview.js (rev 0)
+++ trunk/src/wp-includes/js/media/views/site-icon-preview.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,56 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/*globals wp, jQuery */
+
+/**
+ * wp.media.view.SiteIconPreview
+ *
+ * Shows a preview of the Site Icon as a favicon and app icon while cropping.
+ *
+ * @class
+ * @augments wp.media.View
+ * @augments wp.Backbone.View
+ * @augments Backbone.View
+ */
+var View = wp.media.View,
+ $ = jQuery,
+ SiteIconPreview;
+
+SiteIconPreview = View.extend({
+ className: 'site-icon-preview',
+ template: wp.template( 'site-icon-preview' ),
+
+ ready: function() {
+ this.controller.imgSelect.setOptions({
+ onInit: this.updatePreview,
+ onSelectChange: this.updatePreview
+ });
+ },
+
+ prepare: function() {
+ return {
+ url: this.options.attachment.get( 'url' )
+ };
+ },
+
+ updatePreview: function( img, coords ) {
+ var rx = 64 / coords.width,
+ ry = 64 / coords.height,
+ preview_rx = 16 / coords.width,
+ preview_ry = 16 / coords.height;
+
+ $( '#preview-app-icon' ).css({
+ width: Math.round(rx * this.imageWidth ) + 'px',
+ height: Math.round(ry * this.imageHeight ) + 'px',
+ marginLeft: '-' + Math.round(rx * coords.x1) + 'px',
+ marginTop: '-' + Math.round(ry * coords.y1) + 'px'
+ });
+
+ $( '#preview-favicon' ).css({
+ width: Math.round( preview_rx * this.imageWidth ) + 'px',
+ height: Math.round( preview_ry * this.imageHeight ) + 'px',
+ marginLeft: '-' + Math.round( preview_rx * coords.x1 ) + 'px',
+ marginTop: '-' + Math.floor( preview_ry* coords.y1 ) + 'px'
+ });
+ }
+});
+
+module.exports = SiteIconPreview;
</ins></span></pre></div>
<a id="trunksrcwpincludesjsmediaviewsmanifestjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media/views.manifest.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media/views.manifest.js 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-includes/js/media/views.manifest.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -90,6 +90,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> media.controller.MediaLibrary = require( './controllers/media-library.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.controller.Embed = require( './controllers/embed.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.controller.Cropper = require( './controllers/cropper.js' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+media.controller.CustomizeImageCropper = require( './controllers/customize-image-cropper.js' );
+media.controller.SiteIconCropper = require( './controllers/site-icon-cropper.js' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> media.View = require( './views/view.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.Frame = require( './views/frame.js' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -143,5 +145,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.EmbedImage = require( './views/embed/image.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.ImageDetails = require( './views/image-details.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.Cropper = require( './views/cropper.js' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+media.view.SiteIconCropper = require( './views/site-icon-cropper.js' );
+media.view.SiteIconPreview = require( './views/site-icon-preview.js' );
</ins><span class="cx" style="display: block; padding: 0 10px"> media.view.EditImage = require( './views/edit-image.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.Spinner = require( './views/spinner.js' );
</span></span></pre></div>
<a id="trunksrcwpincludesjsmediaviewsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/js/media-views.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/js/media-views.js 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-includes/js/media-views.js 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -387,6 +387,42 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * wp.media.controller.CustomizeImageCropper
+ *
+ * A state for cropping an image.
+ *
+ * @class
+ * @augments wp.media.controller.Cropper
+ * @augments wp.media.controller.State
+ * @augments Backbone.Model
+ */
+var Controller = wp.media.controller,
+ CustomizeImageCropper;
+
+CustomizeImageCropper = Controller.Cropper.extend({
+ doCrop: function( attachment ) {
+ var cropDetails = attachment.get( 'cropDetails' ),
+ control = this.get( 'control' );
+
+ cropDetails.dst_width = control.params.width;
+ cropDetails.dst_height = control.params.height;
+
+ return wp.ajax.post( 'crop-image', {
+ wp_customize: 'on',
+ nonce: attachment.get( 'nonces' ).edit,
+ id: attachment.get( 'id' ),
+ context: control.id,
+ cropDetails: cropDetails
+ } );
+ }
+});
+
+module.exports = CustomizeImageCropper;
+
+},{}],5:[function(require,module,exports){
+/*globals wp */
+
+/**
</ins><span class="cx" style="display: block; padding: 0 10px"> * wp.media.controller.EditImage
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * A state for editing (cropping, etc.) an image.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -461,7 +497,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditImage;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],5:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],6:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -599,7 +635,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Embed;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],6:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],7:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -723,7 +759,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = FeaturedImage;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],7:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],8:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -816,7 +852,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = GalleryAdd;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],8:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],9:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -960,7 +996,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = GalleryEdit;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],9:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],10:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1024,7 +1060,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = ImageDetails;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],10:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],11:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1298,7 +1334,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Library;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],11:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],12:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1350,7 +1386,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MediaLibrary;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],12:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],13:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals Backbone, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1531,7 +1567,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Region;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],13:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],14:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1641,7 +1677,58 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = ReplaceImage;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],14:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],15:[function(require,module,exports){
+/*globals wp, Backbone */
+
+/**
+ * wp.media.controller.SiteIconCropper
+ *
+ * A state for cropping a Site Icon.
+ *
+ * @class
+ * @augments wp.media.controller.Cropper
+ * @augments wp.media.controller.State
+ * @augments Backbone.Model
+ */
+var Controller = wp.media.controller,
+ SiteIconCropper;
+
+SiteIconCropper = Controller.Cropper.extend({
+ activate: function() {
+ this.frame.on( 'content:create:crop', this.createCropContent, this );
+ this.frame.on( 'close', this.removeCropper, this );
+ this.set('selection', new Backbone.Collection(this.frame._selection.single));
+ },
+
+ createCropContent: function() {
+ this.cropperView = new wp.media.view.SiteIconCropper({
+ controller: this,
+ attachment: this.get('selection').first()
+ });
+ this.cropperView.on('image-loaded', this.createCropToolbar, this);
+ this.frame.content.set(this.cropperView);
+
+ },
+
+ doCrop: function( attachment ) {
+ var cropDetails = attachment.get( 'cropDetails' ),
+ control = this.get( 'control' );
+
+ cropDetails.dst_width = control.params.width;
+ cropDetails.dst_height = control.params.height;
+
+ return wp.ajax.post( 'crop-image', {
+ nonce: attachment.get( 'nonces' ).edit,
+ id: attachment.get( 'id' ),
+ context: 'site-icon',
+ cropDetails: cropDetails
+ } );
+ }
+});
+
+module.exports = SiteIconCropper;
+
+},{}],16:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1767,7 +1854,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = StateMachine;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],15:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],17:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2010,7 +2097,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = State;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],16:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],18:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2078,7 +2165,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = selectionSync;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],17:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],19:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, jQuery, _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> var media = wp.media,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2171,6 +2258,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> media.controller.MediaLibrary = require( './controllers/media-library.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.controller.Embed = require( './controllers/embed.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.controller.Cropper = require( './controllers/cropper.js' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+media.controller.CustomizeImageCropper = require( './controllers/customize-image-cropper.js' );
+media.controller.SiteIconCropper = require( './controllers/site-icon-cropper.js' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> media.View = require( './views/view.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.Frame = require( './views/frame.js' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2224,10 +2313,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.EmbedImage = require( './views/embed/image.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.ImageDetails = require( './views/image-details.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.Cropper = require( './views/cropper.js' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+media.view.SiteIconCropper = require( './views/site-icon-cropper.js' );
+media.view.SiteIconPreview = require( './views/site-icon-preview.js' );
</ins><span class="cx" style="display: block; padding: 0 10px"> media.view.EditImage = require( './views/edit-image.js' );
</span><span class="cx" style="display: block; padding: 0 10px"> media.view.Spinner = require( './views/spinner.js' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{"./controllers/collection-add.js":1,"./controllers/collection-edit.js":2,"./controllers/cropper.js":3,"./controllers/edit-image.js":4,"./controllers/embed.js":5,"./controllers/featured-image.js":6,"./controllers/gallery-add.js":7,"./controllers/gallery-edit.js":8,"./controllers/image-details.js":9,"./controllers/library.js":10,"./controllers/media-library.js":11,"./controllers/region.js":12,"./controllers/replace-image.js":13,"./controllers/state-machine.js":14,"./controllers/state.js":15,"./utils/selection-sync.js":16,"./views/attachment-compat.js":18,"./views/attachment-filters.js":19,"./views/attachment-filters/all.js":20,"./views/attachment-filters/date.js":21,"./views/attachment
-filters/uploaded.js":22,"./views/attachment.js":23,"./views/attachment/details.js":24,"./views/attachment/edit-library.js":25,"./views/attachment/edit-selection.js":26,"./views/attachment/library.js":27,"./views/attachment/selection.js":28,"./views/attachments.js":29,"./views/attachments/browser.js":30,"./views/attachments/selection.js":31,"./views/button-group.js":32,"./views/button.js":33,"./views/cropper.js":34,"./views/edit-image.js":35,"./views/embed.js":36,"./views/embed/image.js":37,"./views/embed/link.js":38,"./views/embed/url.js":39,"./views/focus-manager.js":40,"./views/frame.js":41,"./views/frame/image-details.js":42,"./views/frame/post.js":43,"./views/frame/select.js":44,"./views/iframe.js":45,"./views/image-details.js":46,"
./views/label.js":47,"./views/media-frame.js":48,"./views/menu-item.js":49,"./views/menu.js":50,"./views/modal.js":51,"./views/priority-list.js":52,"./views/router-item.js":53,"./views/router.js":54,"./views/search.js":55,"./views/selection.js":56,"./views/settings.js":57,"./views/settings/attachment-display.js":58,"./views/settings/gallery.js":59,"./views/settings/playlist.js":60,"./views/sidebar.js":61,"./views/spinner.js":62,"./views/toolbar.js":63,"./views/toolbar/embed.js":64,"./views/toolbar/select.js":65,"./views/uploader/editor.js":66,"./views/uploader/inline.js":67,"./views/uploader/status-error.js":68,"./views/uploader/status.js":69,"./views/uploader/window.js":70,"./views/view.js":71}],18:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{"./controllers/collection-add.js":1,"./controllers/collection-edit.js":2,"./controllers/cropper.js":3,"./controllers/customize-image-cropper.js":4,"./controllers/edit-image.js":5,"./controllers/embed.js":6,"./controllers/featured-image.js":7,"./controllers/gallery-add.js":8,"./controllers/gallery-edit.js":9,"./controllers/image-details.js":10,"./controllers/library.js":11,"./controllers/media-library.js":12,"./controllers/region.js":13,"./controllers/replace-image.js":14,"./controllers/site-icon-cropper.js":15,"./controllers/state-machine.js":16,"./controllers/state.js":17,"./utils/selection-sync.js":18,"./views/attachment-compat.js":20,"./views/attachment-filters.js":21,"./views/atta
chment-filters/all.js":22,"./views/attachment-filters/date.js":23,"./views/attachment-filters/uploaded.js":24,"./views/attachment.js":25,"./views/attachment/details.js":26,"./views/attachment/edit-library.js":27,"./views/attachment/edit-selection.js":28,"./views/attachment/library.js":29,"./views/attachment/selection.js":30,"./views/attachments.js":31,"./views/attachments/browser.js":32,"./views/attachments/selection.js":33,"./views/button-group.js":34,"./views/button.js":35,"./views/cropper.js":36,"./views/edit-image.js":37,"./views/embed.js":38,"./views/embed/image.js":39,"./views/embed/link.js":40,"./views/embed/url.js":41,"./views/focus-manager.js":42,"./views/frame.js":43,"./views/frame/image-details.js":44,"./views/frame/post.js":45,"./views
/frame/select.js":46,"./views/iframe.js":47,"./views/image-details.js":48,"./views/label.js":49,"./views/media-frame.js":50,"./views/menu-item.js":51,"./views/menu.js":52,"./views/modal.js":53,"./views/priority-list.js":54,"./views/router-item.js":55,"./views/router.js":56,"./views/search.js":57,"./views/selection.js":58,"./views/settings.js":59,"./views/settings/attachment-display.js":60,"./views/settings/gallery.js":61,"./views/settings/playlist.js":62,"./views/sidebar.js":63,"./views/site-icon-cropper.js":64,"./views/site-icon-preview.js":65,"./views/spinner.js":66,"./views/toolbar.js":67,"./views/toolbar/embed.js":68,"./views/toolbar/select.js":69,"./views/uploader/editor.js":70,"./views/uploader/inline.js":71,"./views/uplo
ader/status-error.js":72,"./views/uploader/status.js":73,"./views/uploader/window.js":74,"./views/view.js":75}],20:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2314,7 +2405,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentCompat;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],19:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],21:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2393,7 +2484,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentFilters;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],20:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],22:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2485,7 +2576,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = All;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],21:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],23:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2528,7 +2619,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = DateFilter;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],22:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],24:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2589,7 +2680,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Uploaded;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],23:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],25:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3137,7 +3228,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Attachment;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],24:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],26:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3277,7 +3368,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Details;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],25:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],27:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3297,7 +3388,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditLibrary;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],26:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],28:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3318,7 +3409,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditSelection;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],27:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],29:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3338,7 +3429,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Library;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],28:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],30:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3362,7 +3453,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Selection;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],29:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],31:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3663,7 +3754,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Attachments;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],30:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],32:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4109,7 +4200,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentsBrowser;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],31:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],33:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4141,7 +4232,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Selection;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],32:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],34:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4189,7 +4280,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = ButtonGroup;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],33:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],35:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4277,7 +4368,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Button;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],34:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],36:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4346,7 +4437,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Cropper;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],35:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],37:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4404,7 +4495,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditImage;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],36:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],38:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Embed
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4468,7 +4559,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Embed;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],37:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],39:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4503,7 +4594,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EmbedImage;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],38:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],40:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4594,7 +4685,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EmbedLink;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],39:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],41:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4675,7 +4766,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EmbedUrl;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],40:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],42:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.FocusManager
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4721,7 +4812,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = FocusManager;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],41:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],43:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4889,7 +4980,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Frame;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],42:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],44:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5068,7 +5159,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = ImageDetails;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],43:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],45:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5805,7 +5896,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Post;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],44:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],46:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5978,7 +6069,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Select;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],45:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],47:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Iframe
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6002,7 +6093,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Iframe;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],46:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],48:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6172,7 +6263,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = ImageDetails;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],47:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],49:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Label
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6198,7 +6289,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Label;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],48:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],50:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6447,7 +6538,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MediaFrame;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],49:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],51:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6521,7 +6612,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = MenuItem;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],50:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],52:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Menu
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6638,7 +6729,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Menu;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],51:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],53:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6853,7 +6944,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Modal;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],52:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],54:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6952,7 +7043,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = PriorityList;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],53:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],55:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.RouterItem
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6976,7 +7067,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = RouterItem;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],54:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],56:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7015,7 +7106,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Router;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],55:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],57:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7065,7 +7156,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Search;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],56:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],58:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7150,7 +7241,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Selection;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],57:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],59:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7273,7 +7364,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Settings;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],58:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],60:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7369,7 +7460,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = AttachmentDisplay;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],59:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],61:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7388,7 +7479,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Gallery;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],60:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],62:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7407,7 +7498,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Playlist;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],61:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],63:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * wp.media.view.Sidebar
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7423,7 +7514,110 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Sidebar;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],62:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],64:[function(require,module,exports){
+/*globals wp, _ */
+
+/**
+ * wp.media.view.SiteIconCropper
+ *
+ * Uses the imgAreaSelect plugin to allow a user to crop a Site Icon.
+ *
+ * Takes imgAreaSelect options from
+ * wp.customize.SiteIconControl.calculateImageSelectOptions.
+ *
+ * @class
+ * @augments wp.media.view.Cropper
+ * @augments wp.media.View
+ * @augments wp.Backbone.View
+ * @augments Backbone.View
+ */
+var View = wp.media.view,
+ SiteIconCropper;
+
+SiteIconCropper = View.Cropper.extend({
+ className: 'crop-content site-icon',
+
+ ready: function () {
+ View.Cropper.prototype.ready.apply( this, arguments );
+
+ this.$( '.crop-image' ).on( 'load', _.bind( this.addSidebar, this ) );
+ },
+
+ addSidebar: function() {
+ this.sidebar = new wp.media.view.Sidebar({
+ controller: this.controller
+ });
+
+ this.sidebar.set( 'preview', new wp.media.view.SiteIconPreview({
+ controller: this.controller,
+ attachment: this.options.attachment
+ }) );
+
+ this.controller.cropperView.views.add( this.sidebar );
+ }
+});
+
+module.exports = SiteIconCropper;
+
+},{}],65:[function(require,module,exports){
+/*globals wp, jQuery */
+
+/**
+ * wp.media.view.SiteIconPreview
+ *
+ * Shows a preview of the Site Icon as a favicon and app icon while cropping.
+ *
+ * @class
+ * @augments wp.media.View
+ * @augments wp.Backbone.View
+ * @augments Backbone.View
+ */
+var View = wp.media.View,
+ $ = jQuery,
+ SiteIconPreview;
+
+SiteIconPreview = View.extend({
+ className: 'site-icon-preview',
+ template: wp.template( 'site-icon-preview' ),
+
+ ready: function() {
+ this.controller.imgSelect.setOptions({
+ onInit: this.updatePreview,
+ onSelectChange: this.updatePreview
+ });
+ },
+
+ prepare: function() {
+ return {
+ url: this.options.attachment.get( 'url' )
+ };
+ },
+
+ updatePreview: function( img, coords ) {
+ var rx = 64 / coords.width,
+ ry = 64 / coords.height,
+ preview_rx = 16 / coords.width,
+ preview_ry = 16 / coords.height;
+
+ $( '#preview-app-icon' ).css({
+ width: Math.round(rx * this.imageWidth ) + 'px',
+ height: Math.round(ry * this.imageHeight ) + 'px',
+ marginLeft: '-' + Math.round(rx * coords.x1) + 'px',
+ marginTop: '-' + Math.round(ry * coords.y1) + 'px'
+ });
+
+ $( '#preview-favicon' ).css({
+ width: Math.round( preview_rx * this.imageWidth ) + 'px',
+ height: Math.round( preview_ry * this.imageHeight ) + 'px',
+ marginLeft: '-' + Math.round( preview_rx * coords.x1 ) + 'px',
+ marginTop: '-' + Math.floor( preview_ry* coords.y1 ) + 'px'
+ });
+ }
+});
+
+module.exports = SiteIconPreview;
+
+},{}],66:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7460,7 +7654,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Spinner;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],63:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],67:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals _, Backbone */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7622,7 +7816,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Toolbar;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],64:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],68:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7661,7 +7855,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Embed;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],65:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],69:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7733,7 +7927,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = Select;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],66:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],70:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7956,7 +8150,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = EditorUploader;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],67:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],71:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8089,7 +8283,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderInline;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],68:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],72:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8107,7 +8301,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderStatusError;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],69:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],73:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _ */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8247,7 +8441,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderStatus;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],70:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],74:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp, _, jQuery */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8360,7 +8554,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = UploaderWindow;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}],71:[function(require,module,exports){
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}],75:[function(require,module,exports){
</ins><span class="cx" style="display: block; padding: 0 10px"> /*globals wp */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8428,4 +8622,4 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = View;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-},{}]},{},[17]);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+},{}]},{},[19]);
</ins></span></pre></div>
<a id="trunksrcwpincludesmediatemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/media-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/media-template.php 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-includes/media-template.php 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1243,6 +1243,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="upload-errors"></div>
</span><span class="cx" style="display: block; padding: 0 10px"> </script>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <script type="text/html" id="tmpl-site-icon-preview">
+ <h2><?php _e( 'Preview' ); ?></h2>
+ <strong><?php _e( 'As a browser icon' ); ?></strong>
+ <div class="favicon-preview">
+ <img src="images/browser.png" class="browser-preview" width="182" height="" alt=""/>
+
+ <div class="favicon">
+ <img id="preview-favicon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
+ </div>
+ <span class="browser-title"><?php bloginfo( 'name' ); ?></span>
+ </div>
+
+ <strong><?php _e( 'As an app icon' ); ?></strong>
+ <div class="app-icon-preview">
+ <img id="preview-app-icon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
+ </div>
+ </script>
+
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcwpincludesscriptloaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/script-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/script-loader.php 2015-07-20 07:44:00 UTC (rev 33328)
+++ trunk/src/wp-includes/script-loader.php 2015-07-20 15:56:19 UTC (rev 33329)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -618,9 +618,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'untitled' => _x( '(no label)', 'missing menu item navigation label' )
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $scripts->add( 'site-icon', '/wp-admin/js/site-icon.js', array( 'jquery' ), false, 1 );
- $scripts->add( 'site-icon-crop', '/wp-admin/js/site-icon-crop.js', array( 'jcrop' ), false, 1 );
-
</del><span class="cx" style="display: block; padding: 0 10px"> $scripts->add( 'custom-header', "/wp-admin/js/custom-header.js", array( 'jquery-masonry' ), false, 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> $scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array( 'wp-color-picker', 'media-views' ), false, 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> $scripts->add( 'media-gallery', "/wp-admin/js/media-gallery$suffix.js", array('jquery'), false, 1 );
</span></span></pre>
</div>
</div>
</body>
</html>