<!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>[29739] trunk/src/wp-includes/js/media-views.js: Add some `@since` annotations to `media-views.js`.</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">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/29739">29739</a></dd>
<dt>Author</dt> <dd>wonderboymusic</dd>
<dt>Date</dt> <dd>2014-09-12 03:35:15 +0000 (Fri, 12 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add some `@since` annotations to `media-views.js`.

Props DrewAPicture.
See <a href="http://core.trac.wordpress.org/ticket/28459">#28459</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesjsmediaviewsjs">trunk/src/wp-includes/js/media-views.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesjsmediaviewsjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/media-views.js (29738 => 29739)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/media-views.js  2014-09-12 01:20:09 UTC (rev 29738)
+++ trunk/src/wp-includes/js/media-views.js     2014-09-12 03:35:15 UTC (rev 29739)
</span><span class="lines">@@ -96,6 +96,8 @@
</span><span class="cx">          /**
</span><span class="cx">           * Activate a mode.
</span><span class="cx">           *
</span><ins>+                * @since 3.5.0
+                *
</ins><span class="cx">            * @param {string} mode
</span><span class="cx">           *
</span><span class="cx">           * @fires this.view#{this.id}:activate:{this._mode}
</span><span class="lines">@@ -137,6 +139,8 @@
</span><span class="cx">          /**
</span><span class="cx">           * Render a mode.
</span><span class="cx">           *
</span><ins>+                * @since 3.5.0
+                *
</ins><span class="cx">            * @param {string} mode
</span><span class="cx">           *
</span><span class="cx">           * @fires this.view#{this.id}:create:{this._mode}
</span><span class="lines">@@ -184,6 +188,8 @@
</span><span class="cx">          /**
</span><span class="cx">           * Get the region's view.
</span><span class="cx">           *
</span><ins>+                * @since 3.5.0
+                *
</ins><span class="cx">            * @returns {wp.media.View}
</span><span class="cx">           */
</span><span class="cx">          get: function() {
</span><span class="lines">@@ -193,6 +199,8 @@
</span><span class="cx">          /**
</span><span class="cx">           * Set the region's view as a subview of the frame.
</span><span class="cx">           *
</span><ins>+                * @since 3.5.0
+                *
</ins><span class="cx">            * @param {Array|Object} views
</span><span class="cx">           * @param {Object} [options={}]
</span><span class="cx">           * @returns {wp.Backbone.Subviews} Subviews is returned to allow chaining
</span><span class="lines">@@ -207,6 +215,8 @@
</span><span class="cx">          /**
</span><span class="cx">           * Trigger regional view events on the frame.
</span><span class="cx">           *
</span><ins>+                * @since 3.5.0
+                *
</ins><span class="cx">            * @param {string} event
</span><span class="cx">           * @returns {undefined|wp.media.controller.Region} Returns itself to allow chaining.
</span><span class="cx">           */
</span><span class="lines">@@ -234,6 +244,8 @@
</span><span class="cx">  /**
</span><span class="cx">   * wp.media.controller.StateMachine
</span><span class="cx">   *
</span><ins>+        * @since 3.5.0
+        *
</ins><span class="cx">    * @constructor
</span><span class="cx">   * @augments Backbone.Model
</span><span class="cx">   * @mixin
</span><span class="lines">@@ -259,6 +271,8 @@
</span><span class="cx">           * Ensure that the `states` collection exists so the `StateMachine`
</span><span class="cx">           *   can be used as a mixin.
</span><span class="cx">           *
</span><ins>+                * @since 3.5.0
+                *
</ins><span class="cx">            * @param {string} id
</span><span class="cx">           * @returns {wp.media.controller.State} Returns a State model
</span><span class="cx">           *   from the StateMachine collection
</span><span class="lines">@@ -282,6 +296,8 @@
</span><span class="cx">           * created the `states` collection, or are trying to select a state
</span><span class="cx">           * that does not exist.
</span><span class="cx">           *
</span><ins>+                * @since 3.5.0
+                *
</ins><span class="cx">            * @param {string} id
</span><span class="cx">           *
</span><span class="cx">           * @fires wp.media.controller.State#deactivate
</span><span class="lines">@@ -313,6 +329,8 @@
</span><span class="cx">           * Call the `state()` method with no parameters to retrieve the current
</span><span class="cx">           * active state.
</span><span class="cx">           *
</span><ins>+                * @since 3.5.0
+                *
</ins><span class="cx">            * @returns {wp.media.controller.State} Returns a State model
</span><span class="cx">           *    from the StateMachine collection
</span><span class="cx">           */
</span><span class="lines">@@ -349,6 +367,11 @@
</span><span class="cx">   * @augments Backbone.Model
</span><span class="cx">   */
</span><span class="cx">  media.controller.State = Backbone.Model.extend({
</span><ins>+               /**
+                * Constructor.
+                *
+                * @since 3.5.0
+                */
</ins><span class="cx">           constructor: function() {
</span><span class="cx">                  this.on( 'activate', this._preActivate, this );
</span><span class="cx">                  this.on( 'activate', this.activate, this );
</span><span class="lines">@@ -366,34 +389,47 @@
</span><span class="cx">          },
</span><span class="cx">          /**
</span><span class="cx">           * @abstract
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          ready: function() {},
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @abstract
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          activate: function() {},
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @abstract
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          deactivate: function() {},
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @abstract
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          reset: function() {},
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @access private
</span><ins>+                * @since 4.0.0
</ins><span class="cx">            */
</span><span class="cx">          _ready: function() {
</span><span class="cx">                  this._updateMenu();
</span><span class="cx">          },
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @access private
</span><ins>+                * @since 3.5.0
</ins><span class="cx">           */
</span><span class="cx">          _preActivate: function() {
</span><span class="cx">                  this.active = true;
</span><span class="cx">          },
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @access private
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          _postActivate: function() {
</span><span class="cx">                  this.on( 'change:menu', this._menu, this );
</span><span class="lines">@@ -409,8 +445,10 @@
</span><span class="cx">                  this._content();
</span><span class="cx">                  this._router();
</span><span class="cx">          },
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @access private
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          _deactivate: function() {
</span><span class="cx">                  this.active = false;
</span><span class="lines">@@ -422,20 +460,26 @@
</span><span class="cx">                  this.off( 'change:content', this._content, this );
</span><span class="cx">                  this.off( 'change:toolbar', this._toolbar, this );
</span><span class="cx">          },
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @access private
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          _title: function() {
</span><span class="cx">                  this.frame.title.render( this.get('titleMode') || 'default' );
</span><span class="cx">          },
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @access private
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          _renderTitle: function( view ) {
</span><span class="cx">                  view.$el.text( this.get('title') || '' );
</span><span class="cx">          },
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @access private
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          _router: function() {
</span><span class="cx">                  var router = this.frame.router,
</span><span class="lines">@@ -454,8 +498,10 @@
</span><span class="cx">                          view.select( this.frame.content.mode() );
</span><span class="cx">                  }
</span><span class="cx">          },
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @access private
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          _menu: function() {
</span><span class="cx">                  var menu = this.frame.menu,
</span><span class="lines">@@ -474,8 +520,10 @@
</span><span class="cx">                          view.select( this.id );
</span><span class="cx">                  }
</span><span class="cx">          },
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @access private
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          _updateMenu: function() {
</span><span class="cx">                  var previous = this.previous('menu'),
</span><span class="lines">@@ -489,8 +537,10 @@
</span><span class="cx">                          this.frame.on( 'menu:render:' + menu, this._renderMenu, this );
</span><span class="cx">                  }
</span><span class="cx">          },
</span><ins>+
</ins><span class="cx">           /**
</span><span class="cx">           * @access private
</span><ins>+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          _renderMenu: function( view ) {
</span><span class="cx">                  var menuItem = this.get('menuItem'),
</span><span class="lines">@@ -526,6 +576,9 @@
</span><span class="cx">  });
</span><span class="cx"> 
</span><span class="cx">  media.selectionSync = {
</span><ins>+               /**
+                * @since 3.5.0
+                */
</ins><span class="cx">           syncSelection: function() {
</span><span class="cx">                  var selection = this.get('selection'),
</span><span class="cx">                          manager = this.frame._selection;
</span><span class="lines">@@ -553,6 +606,8 @@
</span><span class="cx">           * of the selection's attachments and the set of selected
</span><span class="cx">           * attachments that this specific selection considered invalid.
</span><span class="cx">           * Reset the difference and record the single attachment.
</span><ins>+                *
+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          recordSelection: function() {
</span><span class="cx">                  var selection = this.get('selection'),
</span><span class="lines">@@ -607,6 +662,8 @@
</span><span class="cx">          /**
</span><span class="cx">           * If a library isn't provided, query all media items.
</span><span class="cx">           * If a selection instance isn't provided, create one.
</span><ins>+                *
+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          initialize: function() {
</span><span class="cx">                  var selection = this.get('selection'),
</span><span class="lines">@@ -637,6 +694,9 @@
</span><span class="cx">                  this.resetDisplays();
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.5.0
+                */
</ins><span class="cx">           activate: function() {
</span><span class="cx">                  this.syncSelection();
</span><span class="cx"> 
</span><span class="lines">@@ -650,6 +710,9 @@
</span><span class="cx">                  }
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.5.0
+                */
</ins><span class="cx">           deactivate: function() {
</span><span class="cx">                  this.recordSelection();
</span><span class="cx"> 
</span><span class="lines">@@ -662,12 +725,18 @@
</span><span class="cx">                  wp.Uploader.queue.off( null, null, this );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.5.0
+                */
</ins><span class="cx">           reset: function() {
</span><span class="cx">                  this.get('selection').reset();
</span><span class="cx">                  this.resetDisplays();
</span><span class="cx">                  this.refreshContent();
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.5.0
+                */
</ins><span class="cx">           resetDisplays: function() {
</span><span class="cx">                  var defaultProps = media.view.settings.defaultProps;
</span><span class="cx">                  this._displays = [];
</span><span class="lines">@@ -679,6 +748,8 @@
</span><span class="cx">          },
</span><span class="cx"> 
</span><span class="cx">          /**
</span><ins>+                * @since 3.5.0
+                *
</ins><span class="cx">            * @param {wp.media.model.Attachment} attachment
</span><span class="cx">           * @returns {Backbone.Model}
</span><span class="cx">           */
</span><span class="lines">@@ -692,6 +763,8 @@
</span><span class="cx">          },
</span><span class="cx"> 
</span><span class="cx">          /**
</span><ins>+                * @since 3.6.0
+                *
</ins><span class="cx">            * @param {wp.media.model.Attachment} attachment
</span><span class="cx">           * @returns {Object}
</span><span class="cx">           */
</span><span class="lines">@@ -704,6 +777,8 @@
</span><span class="cx">          },
</span><span class="cx"> 
</span><span class="cx">          /**
</span><ins>+                * @since 3.6.0
+                *
</ins><span class="cx">            * @param {wp.media.model.Attachment} attachment
</span><span class="cx">           * @returns {Boolean}
</span><span class="cx">           */
</span><span class="lines">@@ -724,6 +799,8 @@
</span><span class="cx">           * If the state is active, no items are selected, and the current
</span><span class="cx">           * content mode is not an option in the state's router (provided
</span><span class="cx">           * the state has a router), reset the content mode to the default.
</span><ins>+                *
+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          refreshContent: function() {
</span><span class="cx">                  var selection = this.get('selection'),
</span><span class="lines">@@ -745,6 +822,8 @@
</span><span class="cx">           * limit themselves to one attachment (in this case, the last
</span><span class="cx">           * attachment in the upload queue).
</span><span class="cx">           *
</span><ins>+                * @since 3.5.0
+                *
</ins><span class="cx">            * @param {wp.media.model.Attachment} attachment
</span><span class="cx">           */
</span><span class="cx">          uploading: function( attachment ) {
</span><span class="lines">@@ -762,6 +841,8 @@
</span><span class="cx"> 
</span><span class="cx">          /**
</span><span class="cx">           * Only track the browse router on library states.
</span><ins>+                *
+                * @since 3.5.0
</ins><span class="cx">            */
</span><span class="cx">          saveContentMode: function() {
</span><span class="cx">                  if ( 'browse' !== this.get('router') ) {
</span><span class="lines">@@ -800,11 +881,19 @@
</span><span class="cx">                  priority: 60
</span><span class="cx">          }, media.controller.Library.prototype.defaults ),
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                *
+                * @param options Attributes
+                */
</ins><span class="cx">           initialize: function( options ) {
</span><span class="cx">                  this.image = options.image;
</span><span class="cx">                  media.controller.State.prototype.initialize.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           activate: function() {
</span><span class="cx">                  this.frame.modal.$el.addClass('image-details');
</span><span class="cx">          }
</span><span class="lines">@@ -844,6 +933,9 @@
</span><span class="cx">                  syncSelection: false
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           initialize: function() {
</span><span class="cx">                  // If we haven't been provided a `library`, create a `Selection`.
</span><span class="cx">                  if ( ! this.get('library') )
</span><span class="lines">@@ -855,6 +947,9 @@
</span><span class="cx">                  media.controller.Library.prototype.initialize.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * since 3.9.0
+                */
</ins><span class="cx">           activate: function() {
</span><span class="cx">                  var library = this.get('library');
</span><span class="cx"> 
</span><span class="lines">@@ -869,6 +964,9 @@
</span><span class="cx">                  media.controller.Library.prototype.activate.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           deactivate: function() {
</span><span class="cx">                  // Stop watching for uploaded attachments.
</span><span class="cx">                  this.get('library').unobserve( wp.Uploader.queue );
</span><span class="lines">@@ -878,6 +976,11 @@
</span><span class="cx">                  media.controller.Library.prototype.deactivate.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                *
+                * @param browser
+                */
</ins><span class="cx">           gallerySettings: function( browser ) {
</span><span class="cx">                  if ( ! this.get('displaySettings') ) {
</span><span class="cx">                          return;
</span><span class="lines">@@ -936,6 +1039,9 @@
</span><span class="cx">                  syncSelection: false
</span><span class="cx">          }, media.controller.Library.prototype.defaults ),
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           initialize: function() {
</span><span class="cx">                  // If we haven't been provided a `library`, create a `Selection`.
</span><span class="cx">                  if ( ! this.get('library') )
</span><span class="lines">@@ -944,6 +1050,9 @@
</span><span class="cx">                  media.controller.Library.prototype.initialize.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           activate: function() {
</span><span class="cx">                  var library = this.get('library'),
</span><span class="cx">                          edit    = this.frame.state('gallery-edit').get('library');
</span><span class="lines">@@ -998,6 +1107,9 @@
</span><span class="cx">                  syncSelection: false
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           initialize: function() {
</span><span class="cx">                  var collectionType = this.get('collectionType');
</span><span class="cx"> 
</span><span class="lines">@@ -1019,6 +1131,9 @@
</span><span class="cx">                  media.controller.Library.prototype.initialize.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           activate: function() {
</span><span class="cx">                  var library = this.get('library');
</span><span class="cx"> 
</span><span class="lines">@@ -1033,6 +1148,9 @@
</span><span class="cx">                  media.controller.Library.prototype.activate.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           deactivate: function() {
</span><span class="cx">                  // Stop watching for uploaded attachments.
</span><span class="cx">                  this.get('library').unobserve( wp.Uploader.queue );
</span><span class="lines">@@ -1042,6 +1160,11 @@
</span><span class="cx">                  media.controller.Library.prototype.deactivate.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                *
+                * @param browser
+                */
</ins><span class="cx">           renderSettings: function( browser ) {
</span><span class="cx">                  var library = this.get('library'),
</span><span class="cx">                          collectionType = this.get('collectionType'),
</span><span class="lines">@@ -1100,6 +1223,9 @@
</span><span class="cx">                  syncSelection: false
</span><span class="cx">          }, media.controller.Library.prototype.defaults ),
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           initialize: function() {
</span><span class="cx">                  var collectionType = this.get('collectionType');
</span><span class="cx"> 
</span><span class="lines">@@ -1118,6 +1244,9 @@
</span><span class="cx">                  media.controller.Library.prototype.initialize.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           activate: function() {
</span><span class="cx">                  var library = this.get('library'),
</span><span class="cx">                          editLibrary = this.get('editLibrary'),
</span><span class="lines">@@ -1167,6 +1296,9 @@
</span><span class="cx">                  syncSelection: true
</span><span class="cx">          }, media.controller.Library.prototype.defaults ),
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.5.0
+                */
</ins><span class="cx">           initialize: function() {
</span><span class="cx">                  var library, comparator;
</span><span class="cx"> 
</span><span class="lines">@@ -1200,6 +1332,9 @@
</span><span class="cx">                  library.observe( this.get('selection') );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.5.0
+                */
</ins><span class="cx">           activate: function() {
</span><span class="cx">                  this.updateSelection();
</span><span class="cx">                  this.frame.on( 'open', this.updateSelection, this );
</span><span class="lines">@@ -1207,12 +1342,18 @@
</span><span class="cx">                  media.controller.Library.prototype.activate.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.5.0
+                */
</ins><span class="cx">           deactivate: function() {
</span><span class="cx">                  this.frame.off( 'open', this.updateSelection, this );
</span><span class="cx"> 
</span><span class="cx">                  media.controller.Library.prototype.deactivate.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.5.0
+                */
</ins><span class="cx">           updateSelection: function() {
</span><span class="cx">                  var selection = this.get('selection'),
</span><span class="cx">                          id = media.view.settings.post.featuredImageId,
</span><span class="lines">@@ -1251,6 +1392,11 @@
</span><span class="cx">                  syncSelection: true
</span><span class="cx">          }, media.controller.Library.prototype.defaults ),
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                *
+                * @param options
+                */
</ins><span class="cx">           initialize: function( options ) {
</span><span class="cx">                  var library, comparator;
</span><span class="cx"> 
</span><span class="lines">@@ -1285,11 +1431,17 @@
</span><span class="cx">                  library.observe( this.get('selection') );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           activate: function() {
</span><span class="cx">                  this.updateSelection();
</span><span class="cx">                  media.controller.Library.prototype.activate.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           updateSelection: function() {
</span><span class="cx">                  var selection = this.get('selection'),
</span><span class="cx">                          attachment = this.image.attachment;
</span><span class="lines">@@ -1317,14 +1469,23 @@
</span><span class="cx">                  url:     ''
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           activate: function() {
</span><span class="cx">                  this.listenTo( this.frame, 'toolbar:render:edit-image', this.toolbar );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           deactivate: function() {
</span><span class="cx">                  this.stopListening( this.frame );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           toolbar: function() {
</span><span class="cx">                  var frame = this.frame,
</span><span class="cx">                          lastState = frame.lastState(),
</span><span class="lines">@@ -1368,6 +1529,11 @@
</span><span class="cx">                  syncSelection:   false
</span><span class="cx">          }, media.controller.Library.prototype.defaults ),
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                *
+                * @param options
+                */
</ins><span class="cx">           initialize: function( options ) {
</span><span class="cx">                  this.media = options.media;
</span><span class="cx">                  this.type = options.type;
</span><span class="lines">@@ -1376,6 +1542,9 @@
</span><span class="cx">                  media.controller.Library.prototype.initialize.apply( this, arguments );
</span><span class="cx">          },
</span><span class="cx"> 
</span><ins>+               /**
+                * @since 3.9.0
+                */
</ins><span class="cx">           activate: function() {
</span><span class="cx">                  if ( media.frame.lastMime ) {
</span><span class="cx">                          this.set( 'library', media.query({ type: media.frame.lastMime }) );
</span></span></pre>
</div>
</div>

</body>
</html>