<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[12483] trunk/wp-admin/includes/post.php: Updated phpDoc for wp-admin/
includes/post.php .</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12483">12483</a></dd>
<dt>Author</dt> <dd>westi</dd>
<dt>Date</dt> <dd>2009-12-22 12:25:15 +0000 (Tue, 22 Dec 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Updated phpDoc for wp-admin/includes/post.php . Fixes <a href="http://trac.wordpress.org/ticket/11198">#11198</a> based on a patch from Simek.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludespostphp">trunk/wp-admin/includes/post.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/post.php (12482 => 12483)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/post.php        2009-12-22 12:05:28 UTC (rev 12482)
+++ trunk/wp-admin/includes/post.php        2009-12-22 12:25:15 UTC (rev 12483)
</span><span class="lines">@@ -213,13 +213,14 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Process the post data for the bulk editing of posts.
</ins><span class="cx"> *
</span><span class="cx"> * Updates all bulk edited posts/pages, adding (but not removing) tags and
</span><span class="cx"> * categories. Skips pages when they would be their own parent or child.
</span><span class="cx"> *
</span><del>- * @since unknown
</del><ins>+ * @since 2.7.0
</ins><span class="cx"> *
</span><ins>+ * @param array $post_data Optional, the array of post data to process if not provided will use $_POST superglobal.
</ins><span class="cx"> * @return array
</span><span class="cx"> */
</span><span class="cx"> function bulk_edit_posts( $post_data = null ) {
</span><span class="lines">@@ -323,7 +324,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @since unknown
</span><span class="cx"> *
</span><del>- * @return unknown
</del><ins>+ * @return object stdClass object containing all the default post data as attributes
</ins><span class="cx"> */
</span><span class="cx"> function get_default_post_to_edit() {
</span><span class="cx">
</span><span class="lines">@@ -364,11 +365,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Get the default page information to use.
</ins><span class="cx"> *
</span><del>- * @since unknown
</del><ins>+ * @since 2.5.0
</ins><span class="cx"> *
</span><del>- * @return unknown
</del><ins>+ * @return object stdClass object containing all the default post data as attributes
</ins><span class="cx"> */
</span><span class="cx"> function get_default_page_to_edit() {
</span><span class="cx">         $page = get_default_post_to_edit();
</span><span class="lines">@@ -738,8 +739,8 @@
</span><span class="cx">                 if ( ! empty( $attachment) && ! is_object( get_post( $attachment['post_parent'] ) ) ) {
</span><span class="cx">                         $attachment['post_parent'] = $post_ID;
</span><span class="cx">                         // Escape data pulled from DB.
</span><del>-                        $attachment = add_magic_quotes( $attachment);
-                        wp_update_post( $attachment);
</del><ins>+                        $attachment = add_magic_quotes( $attachment );
+                        wp_update_post( $attachment );
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 $post_search[$i] = $anchor;
</span><span class="lines">@@ -789,12 +790,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Get all the possible statuses for a post_type
</ins><span class="cx"> *
</span><del>- * @since unknown
</del><ins>+ * @since 2.5.0
</ins><span class="cx"> *
</span><del>- * @param unknown_type $type
- * @return unknown
</del><ins>+ * @param string $type The post_type you want the statuses for
+ * @return array As array of all the statuses for the supplied post type
</ins><span class="cx"> */
</span><span class="cx"> function get_available_post_statuses($type = 'post') {
</span><span class="cx">         $stati = wp_count_posts($type);
</span><span class="lines">@@ -803,17 +804,17 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /**
</span><del>- * {@internal Missing Short Description}}
</del><ins>+ * Run the wp query to fetch the posts for listing on the edit posts page
</ins><span class="cx"> *
</span><del>- * @since unknown
</del><ins>+ * @since 2.5.0
</ins><span class="cx"> *
</span><del>- * @param unknown_type $q
- * @return unknown
</del><ins>+ * @param array|bool $q Array of query variables to use to build the query or false to use $_GET superglobal.
+ * @return array
</ins><span class="cx"> */
</span><span class="cx"> function wp_edit_posts_query( $q = false ) {
</span><span class="cx">         if ( false === $q )
</span><span class="cx">                 $q = $_GET;
</span><del>-        $q['m'] = isset($q['m']) ? (int) $q['m'] : 0;
</del><ins>+        $q['m'] = isset($q['m']) ? (int) $q['m'] : 0;
</ins><span class="cx">         $q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0;
</span><span class="cx">         $post_stati = array(        //        array( adj, noun )
</span><span class="cx">                                 'publish' => array(_x('Published', 'post'), __('Published posts'), _n_noop('Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>')),
</span><span class="lines">@@ -922,6 +923,7 @@
</span><span class="cx"> /**
</span><span class="cx"> * {@internal Missing Short Description}}
</span><span class="cx"> *
</span><ins>+ * @uses get_user_option()
</ins><span class="cx"> * @since unknown
</span><span class="cx"> *
</span><span class="cx"> * @param unknown_type $id
</span><span class="lines">@@ -933,7 +935,9 @@
</span><span class="cx">                 return '';
</span><span class="cx">         $current_user = wp_get_current_user();
</span><span class="cx">         if ( $closed = get_user_option('closedpostboxes_'.$page, 0, false ) ) {
</span><del>-                if ( !is_array( $closed ) ) return '';
</del><ins>+                if ( !is_array( $closed ) ) {
+                        return '';
+                }
</ins><span class="cx">                 return in_array( $id, $closed )? 'closed' : '';
</span><span class="cx">         } else {
</span><span class="cx">                 return '';
</span><span class="lines">@@ -952,7 +956,7 @@
</span><span class="cx"> */
</span><span class="cx"> function get_sample_permalink($id, $title = null, $name = null) {
</span><span class="cx">         $post = &get_post($id);
</span><del>-        if (!$post->ID) {
</del><ins>+        if ( !$post->ID ) {
</ins><span class="cx">                 return array('', '');
</span><span class="cx">         }
</span><span class="cx">         $original_status = $post->post_status;
</span><span class="lines">@@ -961,7 +965,7 @@
</span><span class="cx">
</span><span class="cx">         // Hack: get_permalink would return ugly permalink for
</span><span class="cx">         // drafts, so we will fake, that our post is published
</span><del>-        if (in_array($post->post_status, array('draft', 'pending'))) {
</del><ins>+        if ( in_array($post->post_status, array('draft', 'pending')) ) {
</ins><span class="cx">                 $post->post_status = 'publish';
</span><span class="cx">                 $post->post_name = sanitize_title($post->post_name ? $post->post_name : $post->post_title, $post->ID);
</span><span class="cx">         }
</span><span class="lines">@@ -970,7 +974,7 @@
</span><span class="cx">
</span><span class="cx">         // If the user wants to set a new name -- override the current one
</span><span class="cx">         // Note: if empty name is supplied -- use the title instead, see #6072
</span><del>-        if (!is_null($name)) {
</del><ins>+        if ( !is_null($name) ) {
</ins><span class="cx">                 $post->post_name = sanitize_title($name ? $name : $title, $post->ID);
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1172,6 +1176,8 @@
</span><span class="cx"> *
</span><span class="cx"> * @uses _wp_translate_postdata()
</span><span class="cx"> * @uses _wp_post_revision_fields()
</span><ins>+ *
+ * @return unknown
</ins><span class="cx"> */
</span><span class="cx"> function wp_create_post_autosave( $post_id ) {
</span><span class="cx">         $translated = _wp_translate_postdata( true );
</span><span class="lines">@@ -1198,7 +1204,7 @@
</span><span class="cx"> * Save draft or manually autosave for showing preview.
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><del>- * @since 2.7
</del><ins>+ * @since 2.7.0
</ins><span class="cx"> *
</span><span class="cx"> * @uses wp_write_post()
</span><span class="cx"> * @uses edit_post()
</span><span class="lines">@@ -1259,7 +1265,7 @@
</span><span class="cx"> * Adds the TinyMCE editor used on the Write and Edit screens.
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><del>- * @since 2.7
</del><ins>+ * @since 2.7.0
</ins><span class="cx"> *
</span><span class="cx"> * TinyMCE is loaded separately from other Javascript by using wp-tinymce.php. It outputs concatenated
</span><span class="cx"> * and optionaly pre-compressed version of the core and all default plugins. Additional plugins are loaded
</span></span></pre>
</div>
</div>
</body>
</html>