<!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>[26987] trunk/src/wp-includes/js/media-editor.js: Elaborate on JSDoc blocks for `media-editor.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/26987">26987</a></dd>
<dt>Author</dt> <dd>wonderboymusic</dd>
<dt>Date</dt> <dd>2014-01-21 15:54:27 +0000 (Tue, 21 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Elaborate on JSDoc blocks for `media-editor.js`.

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

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

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesjsmediaeditorjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/media-editor.js (26986 => 26987)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/media-editor.js 2014-01-20 23:41:42 UTC (rev 26986)
+++ trunk/src/wp-includes/js/media-editor.js    2014-01-21 15:54:27 UTC (rev 26987)
</span><span class="lines">@@ -21,8 +21,8 @@
</span><span class="cx">           *
</span><span class="cx">           * @global wp.media.view.settings.defaultProps
</span><span class="cx">           *
</span><del>-                * @param {Object} props
-                * @param {Object} attachment
</del><ins>+                 * @param {Object} props Attachment details (align, link, size, etc).
+                * @param {Object} attachment The attachment object, media version of Post.
</ins><span class="cx">            * @returns {Object} Joined props
</span><span class="cx">           */
</span><span class="cx">          props: function( props, attachment ) {
</span><span class="lines">@@ -102,8 +102,8 @@
</span><span class="cx">           *
</span><span class="cx">           * @global wp.html.string
</span><span class="cx">           *
</span><del>-                * @param {Object} props
-                * @param {Object} attachment
</del><ins>+                 * @param {Object} props Attachment details (align, link, size, etc).
+                * @param {Object} attachment The attachment object, media version of Post.
</ins><span class="cx">            * @returns {string} The link markup
</span><span class="cx">           */
</span><span class="cx">          link: function( props, attachment ) {
</span><span class="lines">@@ -128,8 +128,8 @@
</span><span class="cx">          /**
</span><span class="cx">           * Create an Audio shortcode
</span><span class="cx">           *
</span><del>-                * @param {Object} props
-                * @param {Object} attachment
</del><ins>+                 * @param {Object} props Attachment details (align, link, size, etc).
+                * @param {Object} attachment The attachment object, media version of Post.
</ins><span class="cx">            * @returns {string} The audio shortcode
</span><span class="cx">           */
</span><span class="cx">          audio: function( props, attachment ) {
</span><span class="lines">@@ -138,8 +138,8 @@
</span><span class="cx">          /**
</span><span class="cx">           * Create a Video shortcode
</span><span class="cx">           *
</span><del>-                * @param {Object} props
-                * @param {Object} attachment
</del><ins>+                 * @param {Object} props Attachment details (align, link, size, etc).
+                * @param {Object} attachment The attachment object, media version of Post.
</ins><span class="cx">            * @returns {string} The video shortcode
</span><span class="cx">           */
</span><span class="cx">          video: function( props, attachment ) {
</span><span class="lines">@@ -154,8 +154,8 @@
</span><span class="cx">           * @global wp.media.view.settings
</span><span class="cx">           *
</span><span class="cx">           * @param {string} type The shortcode tag name: 'audio' or 'video'.
</span><del>-                * @param {Object} props
-                * @param {Object} attachment
</del><ins>+                 * @param {Object} props Attachment details (align, link, size, etc).
+                * @param {Object} attachment The attachment object, media version of Post.
</ins><span class="cx">            * @returns {string} The media shortcode
</span><span class="cx">           */
</span><span class="cx">          _audioVideo: function( type, props, attachment ) {
</span><span class="lines">@@ -199,8 +199,8 @@
</span><span class="cx">           * @global wp.html
</span><span class="cx">           * @global wp.shortcode
</span><span class="cx">           *
</span><del>-                * @param {Object} props
-                * @param {Object} attachment
</del><ins>+                 * @param {Object} props Attachment details (align, link, size, etc).
+                * @param {Object} attachment The attachment object, media version of Post.
</ins><span class="cx">            * @returns {string}
</span><span class="cx">           */
</span><span class="cx">          image: function( props, attachment ) {
</span><span class="lines">@@ -304,8 +304,10 @@
</span><span class="cx">                  /**
</span><span class="cx">                   * @global wp.media.query
</span><span class="cx">                   *
</span><del>-                        * @param {Object} shortcode
-                        * @returns {Object}
</del><ins>+                         * @param {wp.shortcode} shortcode
+                        * @returns {wp.media.model.Attachments} A Backbone.Collection containing
+                        *      the images belonging to a gallery. The 'gallery' prop is a Backbone.Model
+                        *      containing the 'props' for the gallery.
</ins><span class="cx">                    */
</span><span class="cx">                  attachments: function( shortcode ) {
</span><span class="cx">                          var shortcodeString = shortcode.string(),
</span><span class="lines">@@ -363,10 +365,14 @@
</span><span class="cx">                  },
</span><span class="cx"> 
</span><span class="cx">                  /**
</span><ins>+                        * Triggered when clicking 'Insert Gallery' pr 'Update Gallery'
+                        *
</ins><span class="cx">                    * @global wp.shortcode
</span><span class="cx">                   * @global wp.media.model.Attachments
</span><span class="cx">                   *
</span><del>-                        * @param {Object} attachments
</del><ins>+                         * @param {wp.media.model.Attachments} attachments A Backbone.Collection containing
+                        *      the images belonging to a gallery. The 'gallery' prop is a Backbone.Model
+                        *      containing the 'props' for the gallery.
</ins><span class="cx">                    * @returns {wp.shortcode}
</span><span class="cx">                   */
</span><span class="cx">                  shortcode: function( attachments ) {
</span><span class="lines">@@ -428,12 +434,15 @@
</span><span class="cx">                          return shortcode;
</span><span class="cx">                  },
</span><span class="cx">                  /**
</span><ins>+                        * Triggered when double-clicking a Gallery shortcode placeholder
+                        *   in the editor
+                        *
</ins><span class="cx">                    * @global wp.shortcode
</span><span class="cx">                   * @global wp.media.model.Selection
</span><span class="cx">                   * @global wp.media.view.l10n
</span><span class="cx">                   *
</span><span class="cx">                   * @param {string} content
</span><del>-                        * @returns {wp.media.view.MediaFrame} A media workflow.
</del><ins>+                         * @returns {wp.media.view.MediaFrame.Select} A media workflow.
</ins><span class="cx">                    */
</span><span class="cx">                  edit: function( content ) {
</span><span class="cx">                          var shortcode = wp.shortcode.next( 'gallery', content ),
</span><span class="lines">@@ -499,7 +508,7 @@
</span><span class="cx">           *
</span><span class="cx">           * @global wp.media.view.settings
</span><span class="cx">           *
</span><del>-                * @returns {wp.media.view.settings.post.featuredImageId|Number}
</del><ins>+                 * @returns {wp.media.view.settings.post.featuredImageId|number}
</ins><span class="cx">            */
</span><span class="cx">          get: function() {
</span><span class="cx">                  return wp.media.view.settings.post.featuredImageId;
</span><span class="lines">@@ -534,7 +543,7 @@
</span><span class="cx">           * @global wp.media.controller.FeaturedImage
</span><span class="cx">           * @global wp.media.view.l10n
</span><span class="cx">           *
</span><del>-                * @returns {wp.media.view.MediaFrame} A media workflow.
</del><ins>+                 * @returns {wp.media.view.MediaFrame.Select} A media workflow.
</ins><span class="cx">            */
</span><span class="cx">          frame: function() {
</span><span class="cx">                  if ( this._frame ) {
</span><span class="lines">@@ -599,6 +608,7 @@
</span><span class="cx">          /**
</span><span class="cx">           * @global tinymce
</span><span class="cx">           * @global QTags
</span><ins>+                * @global wpActiveEditor
</ins><span class="cx">            *
</span><span class="cx">           * @param {string} html
</span><span class="cx">           */
</span><span class="lines">@@ -647,7 +657,7 @@
</span><span class="cx">           * @param {string} id A slug used to identify the workflow.
</span><span class="cx">           * @param {Object} [options={}]
</span><span class="cx">           *
</span><del>-                * @returns {wp.media.view.MediaFrame} A media workflow.
</del><ins>+                 * @returns {wp.media.view.MediaFrame.Select} A media workflow.
</ins><span class="cx">            */
</span><span class="cx">          add: function( id, options ) {
</span><span class="cx">                  var workflow = this.get( id );
</span><span class="lines">@@ -730,8 +740,8 @@
</span><span class="cx">           * @global wpActiveEditor
</span><span class="cx">           * @global tinymce
</span><span class="cx">           *
</span><del>-                * @param {string} id
-                * @returns {wpActiveEditor|String|tinymce.activeEditor.id}
</del><ins>+                 * @param {string} [id='']
+                * @returns {wpActiveEditor|string|tinymce.activeEditor.id}
</ins><span class="cx">            */
</span><span class="cx">          id: function( id ) {
</span><span class="cx">                  if ( id ) {
</span><span class="lines">@@ -772,11 +782,14 @@
</span><span class="cx"> 
</span><span class="cx">          send: {
</span><span class="cx">                  /**
</span><ins>+                        * Called when sending an attachment to the editor
+                        *   from the medial modal.
+                        *
</ins><span class="cx">                    * @global wp.media.view.settings
</span><span class="cx">                   * @global wp.media.post
</span><span class="cx">                   *
</span><del>-                        * @param {Object} props
-                        * @param {Object} attachment
</del><ins>+                         * @param {Object} props Attachment details (align, link, size, etc).
+                        * @param {Object} attachment The attachment object, media version of Post.
</ins><span class="cx">                    * @returns {Promise}
</span><span class="cx">                   */
</span><span class="cx">                  attachment: function( props, attachment ) {
</span><span class="lines">@@ -828,6 +841,8 @@
</span><span class="cx">                          });
</span><span class="cx">                  },
</span><span class="cx">                  /**
</span><ins>+                        * Called when 'Insert From URL' source is not an image. Example: YouTube url.
+                        *
</ins><span class="cx">                    * @global wp.media.view.settings
</span><span class="cx">                   *
</span><span class="cx">                   * @param {Object} embed
</span></span></pre>
</div>
</div>

</body>
</html>