<!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>[21871] trunk/wp-admin/includes/media.php: Basic phpdoc for admin includes media.php.</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, #logmsg > ol { margin-left: 0; 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/21871">21871</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2012-09-16 18:31:42 +0000 (Sun, 16 Sep 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Basic phpdoc for admin includes media.php. props c3mdigital. fixes <a href="http://core.trac.wordpress.org/ticket/21144">#21144</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (21870 => 21871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2012-09-16 18:26:14 UTC (rev 21870)
+++ trunk/wp-admin/includes/media.php        2012-09-16 18:31:42 UTC (rev 21871)
</span><span class="lines">@@ -7,11 +7,11 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Defines the default media upload tabs
</ins><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @return unknown
</del><ins>+ * @return array default tabs
</ins><span class="cx">  */
</span><span class="cx"> function media_upload_tabs() {
</span><span class="cx">         $_default_tabs = array(
</span><span class="lines">@@ -25,12 +25,12 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Adds the gallery tab back to the tabs array if post has image attachments
</ins><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $tabs
- * @return unknown
</del><ins>+ * @param array $tabs
+ * @return array $tabs with gallery if post has image attachment
</ins><span class="cx">  */
</span><span class="cx"> function update_gallery_tab($tabs) {
</span><span class="cx">         global $wpdb;
</span><span class="lines">@@ -94,14 +94,15 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $id
- * @param unknown_type $alt
- * @param unknown_type $title
- * @param unknown_type $align
- * @param unknown_type $url
- * @param unknown_type $rel
- * @param unknown_type $size
- * @return unknown
</del><ins>+ * @param integer $id image attachment id
+ * @param string $caption image caption
+ * @param string $alt image alt attribute
+ * @param string $title image title attribute
+ * @param string $align image css alignment property
+ * @param string $url image src url
+ * @param string|bool $rel image rel attribute
+ * @param string $size image size (thumbnail, medium, large, full or added  with add_image_size() )
+ * @return string the html to insert into editor
</ins><span class="cx">  */
</span><span class="cx"> function get_image_send_to_editor($id, $caption, $title, $align, $url='', $rel = false, $size='medium', $alt = '') {
</span><span class="cx"> 
</span><span class="lines">@@ -118,18 +119,19 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Adds image shortcode with caption to editor
</ins><span class="cx">  *
</span><span class="cx">  * @since 2.6.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $html
- * @param unknown_type $id
- * @param unknown_type $alt
- * @param unknown_type $title
- * @param unknown_type $align
- * @param unknown_type $url
- * @param unknown_type $size
- * @return unknown
</del><ins>+ * @param string $html
+ * @param integer $id
+ * @param string $caption image caption
+ * @param string $alt image alt attribute
+ * @param string $title image title attribute
+ * @param string $align image css alignment property
+ * @param string $url image src url
+ * @param string $size image size (thumbnail, medium, large, full or added with add_image_size() )
+ * @return string
</ins><span class="cx">  */
</span><span class="cx"> function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $alt = '' ) {
</span><span class="cx"> 
</span><span class="lines">@@ -170,11 +172,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Adds image html to editor
</ins><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $html
</del><ins>+ * @param string $html
</ins><span class="cx">  */
</span><span class="cx"> function media_send_to_editor($html) {
</span><span class="cx"> ?&gt;
</span><span class="lines">@@ -189,8 +191,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
- *
</del><span class="cx">  * This handles the file upload POST itself, creating the attachment post.
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="lines">@@ -312,14 +312,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Adds the iframe to display content for the media upload page
</ins><span class="cx">  *
</span><del>- * Wrap iframe content (produced by $content_func) in a doctype, html head/body
- * etc any additional function args will be passed to content_func.
- *
</del><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $content_func
</del><ins>+ * @param array $content_func
</ins><span class="cx">  */
</span><span class="cx"> function wp_iframe($content_func /* ... */) {
</span><span class="cx">         _wp_admin_html_begin();
</span><span class="lines">@@ -373,9 +370,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Adds the media button to the editor
</ins><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><ins>+ *
+ * @param string $editor_id
</ins><span class="cx">  */
</span><span class="cx"> function media_buttons($editor_id = 'content') {
</span><span class="cx">         $context = apply_filters('media_buttons_context', __('Upload/Insert %s'));
</span><span class="lines">@@ -410,7 +409,7 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @return unknown
</del><ins>+ * @return mixed void|object WP_Error on failure
</ins><span class="cx">  */
</span><span class="cx"> function media_upload_form_handler() {
</span><span class="cx">         check_admin_referer('media-form');
</span><span class="lines">@@ -502,7 +501,7 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @return unknown
</del><ins>+ * @return mixed
</ins><span class="cx">  */
</span><span class="cx"> function wp_media_upload_handler() {
</span><span class="cx">         $errors = array();
</span><span class="lines">@@ -673,9 +672,9 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.7.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $post
- * @param unknown_type $checked
- * @return unknown
</del><ins>+ * @param object $post
+ * @param string $checked
+ * @return string
</ins><span class="cx">  */
</span><span class="cx"> function image_align_input_fields( $post, $checked = '' ) {
</span><span class="cx"> 
</span><span class="lines">@@ -701,9 +700,9 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.7.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $post
- * @param unknown_type $check
- * @return unknown
</del><ins>+ * @param object $post
+ * @param bool|string $check
+ * @return array
</ins><span class="cx">  */
</span><span class="cx"> function image_size_input_fields( $post, $check = '' ) {
</span><span class="cx"> 
</span><span class="lines">@@ -756,9 +755,9 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.7.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $post
- * @param unknown_type $url_type
- * @return unknown
</del><ins>+ * @param object $post
+ * @param string $url_type
+ * @return string
</ins><span class="cx">  */
</span><span class="cx"> function image_link_input_fields($post, $url_type = '') {
</span><span class="cx"> 
</span><span class="lines">@@ -794,9 +793,9 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $form_fields
- * @param unknown_type $post
- * @return unknown
</del><ins>+ * @param array $form_fields
+ * @param object $post
+ * @return array
</ins><span class="cx">  */
</span><span class="cx"> function image_attachment_fields_to_edit($form_fields, $post) {
</span><span class="cx">         if ( substr($post-&gt;post_mime_type, 0, 5) == 'image' ) {
</span><span class="lines">@@ -833,9 +832,9 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $form_fields
- * @param unknown_type $post
- * @return unknown
</del><ins>+ * @param array $form_fields
+ * @param object $post {@internal $post not used}}
+ * @return array
</ins><span class="cx">  */
</span><span class="cx"> function media_single_attachment_fields_to_edit( $form_fields, $post ) {
</span><span class="cx">         unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']);
</span><span class="lines">@@ -847,9 +846,9 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.8.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $form_fields
- * @param unknown_type $post
- * @return unknown
</del><ins>+ * @param array $form_fields
+ * @param object $post {@internal $post not used}}
+ * @return array
</ins><span class="cx">  */
</span><span class="cx"> function media_post_single_attachment_fields_to_edit( $form_fields, $post ) {
</span><span class="cx">         unset($form_fields['image_url']);
</span><span class="lines">@@ -865,8 +864,8 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param array $post
- * @param array $attachment
</del><ins>+ * @param object $post
+ * @param array $attachment {@internal $attachment not used}}
</ins><span class="cx">  * @return array
</span><span class="cx">  */
</span><span class="cx"> function image_attachment_fields_to_save($post, $attachment) {
</span><span class="lines">@@ -887,10 +886,10 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $html
- * @param unknown_type $attachment_id
- * @param unknown_type $attachment
- * @return unknown
</del><ins>+ * @param string $html
+ * @param integer $attachment_id
+ * @param array $attachment
+ * @return array
</ins><span class="cx">  */
</span><span class="cx"> function image_media_send_to_editor($html, $attachment_id, $attachment) {
</span><span class="cx">         $post = get_post($attachment_id);
</span><span class="lines">@@ -914,9 +913,9 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $post
- * @param unknown_type $errors
- * @return unknown
</del><ins>+ * @param object $post
+ * @param array $errors
+ * @return array
</ins><span class="cx">  */
</span><span class="cx"> function get_attachment_fields_to_edit($post, $errors = null) {
</span><span class="cx">         if ( is_int($post) )
</span><span class="lines">@@ -1412,9 +1411,9 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $type
- * @param unknown_type $errors
- * @param unknown_type $id
</del><ins>+ * @param string $type
+ * @param object $errors
+ * @param integer $id
</ins><span class="cx">  */
</span><span class="cx"> function media_upload_type_form($type = 'file', $errors = null, $id = null) {
</span><span class="cx"> 
</span><span class="lines">@@ -1475,9 +1474,9 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.7.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $type
- * @param unknown_type $errors
- * @param unknown_type $id
</del><ins>+ * @param string $type
+ * @param object $errors
+ * @param integer $id
</ins><span class="cx">  */
</span><span class="cx"> function media_upload_type_url_form($type = null, $errors = null, $id = null) {
</span><span class="cx">         if ( null === $type )
</span><span class="lines">@@ -1608,11 +1607,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Adds gallery form to upload iframe
</ins><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $errors
</del><ins>+ * @param array $errors
</ins><span class="cx">  */
</span><span class="cx"> function media_upload_gallery_form($errors) {
</span><span class="cx">         global $redir_tab, $type;
</span><span class="lines">@@ -1758,7 +1757,7 @@
</span><span class="cx">  *
</span><span class="cx">  * @since 2.5.0
</span><span class="cx">  *
</span><del>- * @param unknown_type $errors
</del><ins>+ * @param array $errors
</ins><span class="cx">  */
</span><span class="cx"> function media_upload_library_form($errors) {
</span><span class="cx">         global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types;
</span><span class="lines">@@ -1921,11 +1920,12 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Creates the form for external url
</ins><span class="cx">  *
</span><span class="cx">  * @since 2.7.0
</span><span class="cx">  *
</span><del>- * @return unknown
</del><ins>+ * @param string $default_view
+ * @return string the form html
</ins><span class="cx">  */
</span><span class="cx"> function wp_media_insert_url_form( $default_view = 'image' ) {
</span><span class="cx">         if ( !apply_filters( 'disable_captions', '' ) ) {
</span></span></pre>
</div>
</div>

</body>
</html>