<!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>[21597] trunk: Remove return ref from all calls to get_post()</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/21597">21597</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2012-08-23 20:01:10 +0000 (Thu, 23 Aug 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove return ref from all calls to get_post()
Return WP_Post from get_default_post_to_edit()
Replace all calls to get_page() with get_post()
see <a href="http://core.trac.wordpress.org/ticket/21309">#21309</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmineditphp">trunk/wp-admin/edit.php</a></li>
<li><a href="#trunkwpadminincludesajaxactionsphp">trunk/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunkwpadminincludesclasswppostslisttablephp">trunk/wp-admin/includes/class-wp-posts-list-table.php</a></li>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
<li><a href="#trunkwpadminincludespostphp">trunk/wp-admin/includes/post.php</a></li>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
<li><a href="#trunkwpadminpostphp">trunk/wp-admin/post.php</a></li>
<li><a href="#trunkwpadminuploadphp">trunk/wp-admin/upload.php</a></li>
<li><a href="#trunkwpincludesclasswpxmlrpcserverphp">trunk/wp-includes/class-wp-xmlrpc-server.php</a></li>
<li><a href="#trunkwpincludescommentphp">trunk/wp-includes/comment.php</a></li>
<li><a href="#trunkwpincludesdeprecatedphp">trunk/wp-includes/deprecated.php</a></li>
<li><a href="#trunkwpincludesgeneraltemplatephp">trunk/wp-includes/general-template.php</a></li>
<li><a href="#trunkwpincludeslinktemplatephp">trunk/wp-includes/link-template.php</a></li>
<li><a href="#trunkwpincludesmediaphp">trunk/wp-includes/media.php</a></li>
<li><a href="#trunkwpincludesposttemplatephp">trunk/wp-includes/post-template.php</a></li>
<li><a href="#trunkwpincludespostphp">trunk/wp-includes/post.php</a></li>
<li><a href="#trunkwpincludesqueryphp">trunk/wp-includes/query.php</a></li>
<li><a href="#trunkwpincludestaxonomyphp">trunk/wp-includes/taxonomy.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmineditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-admin/edit.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx">                 case 'delete':
</span><span class="cx">                         $deleted = 0;
</span><span class="cx">                         foreach( (array) $post_ids as $post_id ) {
</span><del>-                                $post_del = & get_post($post_id);
</del><ins>+                                $post_del = get_post($post_id);
</ins><span class="cx">
</span><span class="cx">                                 if ( !current_user_can($post_type_object->cap->delete_post, $post_id) )
</span><span class="cx">                                         wp_die( __('You are not allowed to delete this item.') );
</span></span></pre></div>
<a id="trunkwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ajax-actions.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ajax-actions.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-admin/includes/ajax-actions.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -512,7 +512,7 @@
</span><span class="cx">         if ( !current_user_can( 'delete_page', $id ) )
</span><span class="cx">                 wp_die( -1 );
</span><span class="cx">
</span><del>-        if ( !get_page( $id ) )
</del><ins>+        if ( ! get_post( $id ) )
</ins><span class="cx">                 wp_die( 1 );
</span><span class="cx">
</span><span class="cx">         if ( wp_delete_post( $id ) )
</span></span></pre></div>
<a id="trunkwpadminincludesclasswppostslisttablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/class-wp-posts-list-table.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/class-wp-posts-list-table.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-admin/includes/class-wp-posts-list-table.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -509,7 +509,7 @@
</span><span class="cx">                                                 //sent level 0 by accident, by default, or because we don't know the actual level
</span><span class="cx">                                                 $find_main_page = (int) $post->post_parent;
</span><span class="cx">                                                 while ( $find_main_page > 0 ) {
</span><del>-                                                        $parent = get_page( $find_main_page );
</del><ins>+                                                        $parent = get_post( $find_main_page );
</ins><span class="cx">
</span><span class="cx">                                                         if ( is_null( $parent ) )
</span><span class="cx">                                                                 break;
</span></span></pre></div>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-admin/includes/media.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -893,7 +893,7 @@
</span><span class="cx"> * @return unknown
</span><span class="cx"> */
</span><span class="cx"> function image_media_send_to_editor($html, $attachment_id, $attachment) {
</span><del>-        $post =& get_post($attachment_id);
</del><ins>+        $post = get_post($attachment_id);
</ins><span class="cx">         if ( substr($post->post_mime_type, 0, 5) == 'image' ) {
</span><span class="cx">                 $url = $attachment['url'];
</span><span class="cx">                 $align = !empty($attachment['align']) ? $attachment['align'] : 'none';
</span><span class="lines">@@ -920,9 +920,9 @@
</span><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><del>-                $post =& get_post($post);
</del><ins>+                $post = get_post($post);
</ins><span class="cx">         if ( is_array($post) )
</span><del>-                $post = (object) $post;
</del><ins>+                $post = new WP_Post( (object) $post );
</ins><span class="cx">
</span><span class="cx">         $image_url = wp_get_attachment_url($post->ID);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/post.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/post.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-admin/includes/post.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">
</span><span class="cx">         // Autosave shouldn't save too soon after a real save
</span><span class="cx">         if ( 'autosave' == $post_data['action'] ) {
</span><del>-                $post =& get_post( $post_ID );
</del><ins>+                $post = get_post( $post_ID );
</ins><span class="cx">                 $now = time();
</span><span class="cx">                 $then = strtotime($post->post_date_gmt . ' +0000');
</span><span class="cx">                 $delta = AUTOSAVE_INTERVAL / 2;
</span><span class="lines">@@ -439,6 +439,7 @@
</span><span class="cx">                 $post->page_template = 'default';
</span><span class="cx">                 $post->post_parent = 0;
</span><span class="cx">                 $post->menu_order = 0;
</span><ins>+                $post = new WP_Post( $post );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $post->post_content = apply_filters( 'default_content', $post_content, $post );
</span><span class="lines">@@ -745,7 +746,7 @@
</span><span class="cx"> * @return unknown
</span><span class="cx"> */
</span><span class="cx"> function _fix_attachment_links( $post_ID ) {
</span><del>-        $post = & get_post( $post_ID, ARRAY_A );
</del><ins>+        $post = get_post( $post_ID, ARRAY_A );
</ins><span class="cx">         $content = $post['post_content'];
</span><span class="cx">
</span><span class="cx">         // quick sanity check, don't run if no pretty permalinks or post is not published
</span><span class="lines">@@ -1012,7 +1013,7 @@
</span><span class="cx"> * @return array With two entries of type string
</span><span class="cx"> */
</span><span class="cx"> function get_sample_permalink($id, $title = null, $name = null) {
</span><del>-        $post = &get_post($id);
</del><ins>+        $post = get_post($id);
</ins><span class="cx">         if ( !$post->ID )
</span><span class="cx">                 return array('', '');
</span><span class="cx">
</span><span class="lines">@@ -1078,7 +1079,7 @@
</span><span class="cx"> */
</span><span class="cx"> function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
</span><span class="cx">         global $wpdb;
</span><del>-        $post = &get_post($id);
</del><ins>+        $post = get_post($id);
</ins><span class="cx">
</span><span class="cx">         list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-admin/includes/template.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -705,7 +705,7 @@
</span><span class="cx"> */
</span><span class="cx"> function the_attachment_links( $id = false ) {
</span><span class="cx">         $id = (int) $id;
</span><del>-        $post = & get_post( $id );
</del><ins>+        $post = get_post( $id );
</ins><span class="cx">
</span><span class="cx">         if ( $post->post_type != 'attachment' )
</span><span class="cx">                 return false;
</span></span></pre></div>
<a id="trunkwpadminpostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/post.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/post.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-admin/post.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -202,7 +202,7 @@
</span><span class="cx"> case 'trash':
</span><span class="cx">         check_admin_referer('trash-post_' . $post_id);
</span><span class="cx">
</span><del>-        $post = & get_post($post_id);
</del><ins>+        $post = get_post($post_id);
</ins><span class="cx">
</span><span class="cx">         if ( !current_user_can($post_type_object->cap->delete_post, $post_id) )
</span><span class="cx">                 wp_die( __('You are not allowed to move this item to the Trash.') );
</span></span></pre></div>
<a id="trunkwpadminuploadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/upload.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/upload.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-admin/upload.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">                         if ( !$parent_id )
</span><span class="cx">                                 return;
</span><span class="cx">
</span><del>-                        $parent = &get_post( $parent_id );
</del><ins>+                        $parent = get_post( $parent_id );
</ins><span class="cx">                         if ( !current_user_can( 'edit_post', $parent_id ) )
</span><span class="cx">                                 wp_die( __( 'You are not allowed to edit this post.' ) );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesclasswpxmlrpcserverphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-xmlrpc-server.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-xmlrpc-server.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-includes/class-wp-xmlrpc-server.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -775,7 +775,7 @@
</span><span class="cx">                 // Get info the page parent if there is one.
</span><span class="cx">                 $parent_title = "";
</span><span class="cx">                 if ( ! empty( $page->post_parent ) ) {
</span><del>-                        $parent = get_page( $page->post_parent );
</del><ins>+                        $parent = get_post( $page->post_parent );
</ins><span class="cx">                         $parent_title = $parent->post_title;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -1943,7 +1943,7 @@
</span><span class="cx">                         return $this->error;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                $page = get_page($page_id);
</del><ins>+                $page = get_post($page_id);
</ins><span class="cx">                 if ( ! $page )
</span><span class="cx">                         return new IXR_Error( 404, __( 'Invalid post ID.' ) );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludescommentphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/comment.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/comment.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-includes/comment.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -1371,7 +1371,7 @@
</span><span class="cx">                 if ( '0' == $commentdata['comment_approved'] )
</span><span class="cx">                         wp_notify_moderator($comment_ID);
</span><span class="cx">
</span><del>-                $post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment
</del><ins>+                $post = get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment
</ins><span class="cx">
</span><span class="cx">                 if ( get_option('comments_notify') && $commentdata['comment_approved'] && ( ! isset( $commentdata['user_id'] ) || $post->post_author != $commentdata['user_id'] ) )
</span><span class="cx">                         wp_notify_postauthor($comment_ID, isset( $commentdata['comment_type'] ) ? $commentdata['comment_type'] : '' );
</span></span></pre></div>
<a id="trunkwpincludesdeprecatedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/deprecated.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/deprecated.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-includes/deprecated.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> function get_postdata($postid) {
</span><span class="cx">         _deprecated_function( __FUNCTION__, '1.5.1', 'get_post()' );
</span><span class="cx">
</span><del>-        $post = &get_post($postid);
</del><ins>+        $post = get_post($postid);
</ins><span class="cx">
</span><span class="cx">         $postdata = array (
</span><span class="cx">                 'ID' => $post->ID,
</span><span class="lines">@@ -1892,7 +1892,7 @@
</span><span class="cx"> function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) {
</span><span class="cx">         _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_link()' );
</span><span class="cx">         $id = (int) $id;
</span><del>-        $_post = & get_post($id);
</del><ins>+        $_post = get_post($id);
</ins><span class="cx">
</span><span class="cx">         if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) )
</span><span class="cx">                 return __('Missing Attachment');
</span><span class="lines">@@ -1921,7 +1921,7 @@
</span><span class="cx"> function get_attachment_icon_src( $id = 0, $fullsize = false ) {
</span><span class="cx">         _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image_src()' );
</span><span class="cx">         $id = (int) $id;
</span><del>-        if ( !$post = & get_post($id) )
</del><ins>+        if ( !$post = get_post($id) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $file = get_attached_file( $post->ID );
</span><span class="lines">@@ -1966,7 +1966,7 @@
</span><span class="cx"> function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
</span><span class="cx">         _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' );
</span><span class="cx">         $id = (int) $id;
</span><del>-        if ( !$post = & get_post($id) )
</del><ins>+        if ( !$post = get_post($id) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         if ( !$src = get_attachment_icon_src( $post->ID, $fullsize ) )
</span><span class="lines">@@ -2023,7 +2023,7 @@
</span><span class="cx"> function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) {
</span><span class="cx">         _deprecated_function( __FUNCTION__, '2.5', 'wp_get_attachment_image()' );
</span><span class="cx">         $id = (int) $id;
</span><del>-        if ( !$post = & get_post($id) )
</del><ins>+        if ( !$post = get_post($id) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         if ( $innerHTML = get_attachment_icon($post->ID, $fullsize, $max_dims))
</span><span class="lines">@@ -2801,7 +2801,7 @@
</span><span class="cx">         _deprecated_function( __FUNCTION__, '3.3' );
</span><span class="cx">
</span><span class="cx">         if ( ! empty( $GLOBALS['post'] ) && ! empty( $GLOBALS['post']->post_parent ) )
</span><del>-                $post = & get_post($GLOBALS['post']->post_parent);
</del><ins>+                $post = get_post($GLOBALS['post']->post_parent);
</ins><span class="cx">
</span><span class="cx">         if ( empty($post) )
</span><span class="cx">                 return;
</span></span></pre></div>
<a id="trunkwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/general-template.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/general-template.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-includes/general-template.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -1627,7 +1627,7 @@
</span><span class="cx">
</span><span class="cx">         if ( is_single() || is_page() ) {
</span><span class="cx">                 $id = 0;
</span><del>-                $post = &get_post( $id );
</del><ins>+                $post = get_post( $id );
</ins><span class="cx">
</span><span class="cx">                 if ( comments_open() || pings_open() || $post->comment_count > 0 ) {
</span><span class="cx">                         $title = sprintf( $args['singletitle'], get_bloginfo('name'), $args['separator'], esc_html( get_the_title() ) );
</span></span></pre></div>
<a id="trunkwpincludeslinktemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/link-template.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/link-template.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-includes/link-template.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">                 $post = $id;
</span><span class="cx">                 $sample = true;
</span><span class="cx">         } else {
</span><del>-                $post = &get_post($id);
</del><ins>+                $post = get_post($id);
</ins><span class="cx">                 $sample = false;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx"> function get_post_permalink( $id = 0, $leavename = false, $sample = false ) {
</span><span class="cx">         global $wp_rewrite;
</span><span class="cx">
</span><del>-        $post = &get_post($id);
</del><ins>+        $post = get_post($id);
</ins><span class="cx">
</span><span class="cx">         if ( is_wp_error( $post ) )
</span><span class="cx">                 return $post;
</span><span class="lines">@@ -895,7 +895,7 @@
</span><span class="cx"> * @return string
</span><span class="cx"> */
</span><span class="cx"> function get_edit_post_link( $id = 0, $context = 'display' ) {
</span><del>-        if ( !$post = &get_post( $id ) )
</del><ins>+        if ( !$post = get_post( $id ) )
</ins><span class="cx">                 return;
</span><span class="cx">
</span><span class="cx">         if ( 'display' == $context )
</span><span class="lines">@@ -924,7 +924,7 @@
</span><span class="cx"> * @param int $id Optional. Post ID.
</span><span class="cx"> */
</span><span class="cx"> function edit_post_link( $link = null, $before = '', $after = '', $id = 0 ) {
</span><del>-        if ( !$post = &get_post( $id ) )
</del><ins>+        if ( !$post = get_post( $id ) )
</ins><span class="cx">                 return;
</span><span class="cx">
</span><span class="cx">         if ( !$url = get_edit_post_link( $post->ID ) )
</span><span class="lines">@@ -954,7 +954,7 @@
</span><span class="cx">         if ( ! empty( $deprecated ) )
</span><span class="cx">                 _deprecated_argument( __FUNCTION__, '3.0' );
</span><span class="cx">
</span><del>-        if ( !$post = &get_post( $id ) )
</del><ins>+        if ( !$post = get_post( $id ) )
</ins><span class="cx">                 return;
</span><span class="cx">
</span><span class="cx">         $post_type_object = get_post_type_object( $post->post_type );
</span><span class="lines">@@ -1201,7 +1201,7 @@
</span><span class="cx"> */
</span><span class="cx"> function get_adjacent_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $previous = true) {
</span><span class="cx">         if ( $previous && is_attachment() && is_object( $GLOBALS['post'] ) )
</span><del>-                $post = & get_post($GLOBALS['post']->post_parent);
</del><ins>+                $post = get_post($GLOBALS['post']->post_parent);
</ins><span class="cx">         else
</span><span class="cx">                 $post = get_adjacent_post($in_same_cat,$excluded_categories,$previous);
</span><span class="cx">
</span><span class="lines">@@ -1366,7 +1366,7 @@
</span><span class="cx"> */
</span><span class="cx"> function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) {
</span><span class="cx">         if ( $previous && is_attachment() )
</span><del>-                $post = & get_post($GLOBALS['post']->post_parent);
</del><ins>+                $post = get_post($GLOBALS['post']->post_parent);
</ins><span class="cx">         else
</span><span class="cx">                 $post = get_adjacent_post($in_same_cat, $excluded_categories, $previous);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/media.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/media.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-includes/media.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -655,7 +655,7 @@
</span><span class="cx">                 $hwstring = image_hwstring($width, $height);
</span><span class="cx">                 if ( is_array($size) )
</span><span class="cx">                         $size = join('x', $size);
</span><del>-                $attachment =& get_post($attachment_id);
</del><ins>+                $attachment = get_post($attachment_id);
</ins><span class="cx">                 $default_attr = array(
</span><span class="cx">                         'src'        => $src,
</span><span class="cx">                         'class'        => "attachment-$size",
</span></span></pre></div>
<a id="trunkwpincludesposttemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post-template.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post-template.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-includes/post-template.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx"> * @return string
</span><span class="cx"> */
</span><span class="cx"> function get_the_title( $id = 0 ) {
</span><del>-        $post = &get_post($id);
</del><ins>+        $post = get_post($id);
</ins><span class="cx">
</span><span class="cx">         $title = isset($post->post_title) ? $post->post_title : '';
</span><span class="cx">         $id = isset($post->ID) ? $post->ID : (int) $id;
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx"> * @return string
</span><span class="cx"> */
</span><span class="cx"> function get_the_guid( $id = 0 ) {
</span><del>-        $post = &get_post($id);
</del><ins>+        $post = get_post($id);
</ins><span class="cx">
</span><span class="cx">         return apply_filters('get_the_guid', $post->guid);
</span><span class="cx"> }
</span><span class="lines">@@ -276,7 +276,7 @@
</span><span class="cx"> * @return bool
</span><span class="cx"> */
</span><span class="cx"> function has_excerpt( $id = 0 ) {
</span><del>-        $post = &get_post( $id );
</del><ins>+        $post = get_post( $id );
</ins><span class="cx">         return ( !empty( $post->post_excerpt ) );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -474,7 +474,7 @@
</span><span class="cx">
</span><span class="cx">                 $page_id = $wp_query->get_queried_object_id();
</span><span class="cx">
</span><del>-                $post = get_page($page_id);
</del><ins>+                $post = get_post($page_id);
</ins><span class="cx">
</span><span class="cx">                 $classes[] = 'page-id-' . $page_id;
</span><span class="cx">
</span><span class="lines">@@ -1015,7 +1015,7 @@
</span><span class="cx">                 extract($args, EXTR_SKIP);
</span><span class="cx">                 $css_class = array('page_item', 'page-item-'.$page->ID);
</span><span class="cx">                 if ( !empty($current_page) ) {
</span><del>-                        $_current_page = get_page( $current_page );
</del><ins>+                        $_current_page = get_post( $current_page );
</ins><span class="cx">                         if ( in_array( $page->ID, $_current_page->ancestors ) )
</span><span class="cx">                                 $css_class[] = 'current_page_ancestor';
</span><span class="cx">                         if ( $page->ID == $current_page )
</span><span class="lines">@@ -1138,7 +1138,7 @@
</span><span class="cx"> */
</span><span class="cx"> function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false ) {
</span><span class="cx">         $id = intval( $id );
</span><del>-        $_post = & get_post( $id );
</del><ins>+        $_post = get_post( $id );
</ins><span class="cx">
</span><span class="cx">         if ( empty( $_post ) || ( 'attachment' != $_post->post_type ) || ! $url = wp_get_attachment_url( $_post->ID ) )
</span><span class="cx">                 return __( 'Missing Attachment' );
</span></span></pre></div>
<a id="trunkwpincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-includes/post.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -586,7 +586,7 @@
</span><span class="cx"> * @return bool|string False on failure or returns the mime type
</span><span class="cx"> */
</span><span class="cx"> function get_post_mime_type($ID = '') {
</span><del>-        $post = & get_post($ID);
</del><ins>+        $post = get_post($ID);
</ins><span class="cx">
</span><span class="cx">         if ( is_object($post) )
</span><span class="cx">                 return $post->post_mime_type;
</span><span class="lines">@@ -3348,7 +3348,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if ( $foundid )
</span><del>-                return get_page( $foundid, $output );
</del><ins>+                return get_post( $foundid, $output );
</ins><span class="cx">
</span><span class="cx">         return null;
</span><span class="cx"> }
</span><span class="lines">@@ -3368,7 +3368,7 @@
</span><span class="cx">         global $wpdb;
</span><span class="cx">         $page = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type= %s", $page_title, $post_type ) );
</span><span class="cx">         if ( $page )
</span><del>-                return get_page($page, $output);
</del><ins>+                return get_post( $page, $output );
</ins><span class="cx">
</span><span class="cx">         return null;
</span><span class="cx"> }
</span><span class="lines">@@ -3455,11 +3455,11 @@
</span><span class="cx"> */
</span><span class="cx"> function get_page_uri($page) {
</span><span class="cx">         if ( ! is_object($page) )
</span><del>-                $page = get_page($page);
</del><ins>+                $page = get_post( $page );
</ins><span class="cx">         $uri = $page->post_name;
</span><span class="cx">
</span><span class="cx">         foreach ( $page->ancestors as $parent ) {
</span><del>-                $uri = get_page($parent)->post_name . "/" . $uri;
</del><ins>+                $uri = get_post( $parent )->post_name . "/" . $uri;
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         return $uri;
</span><span class="lines">@@ -3716,7 +3716,7 @@
</span><span class="cx">         if (strpos($url, home_url('/?attachment_id=')) !== false)
</span><span class="cx">                 return true;
</span><span class="cx">         if ( $id = url_to_postid($url) ) {
</span><del>-                $post = & get_post($id);
</del><ins>+                $post = get_post($id);
</ins><span class="cx">                 if ( 'attachment' == $post->post_type )
</span><span class="cx">                         return true;
</span><span class="cx">         }
</span><span class="lines">@@ -4012,7 +4012,7 @@
</span><span class="cx"> */
</span><span class="cx"> function wp_get_attachment_metadata( $post_id = 0, $unfiltered = false ) {
</span><span class="cx">         $post_id = (int) $post_id;
</span><del>-        if ( !$post =& get_post( $post_id ) )
</del><ins>+        if ( !$post = get_post( $post_id ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $data = get_post_meta( $post->ID, '_wp_attachment_metadata', true );
</span><span class="lines">@@ -4034,7 +4034,7 @@
</span><span class="cx"> */
</span><span class="cx"> function wp_update_attachment_metadata( $post_id, $data ) {
</span><span class="cx">         $post_id = (int) $post_id;
</span><del>-        if ( !$post =& get_post( $post_id ) )
</del><ins>+        if ( !$post = get_post( $post_id ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $data = apply_filters( 'wp_update_attachment_metadata', $data, $post->ID );
</span><span class="lines">@@ -4052,7 +4052,7 @@
</span><span class="cx"> */
</span><span class="cx"> function wp_get_attachment_url( $post_id = 0 ) {
</span><span class="cx">         $post_id = (int) $post_id;
</span><del>-        if ( !$post =& get_post( $post_id ) )
</del><ins>+        if ( !$post = get_post( $post_id ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         if ( 'attachment' != $post->post_type )
</span><span class="lines">@@ -4091,7 +4091,7 @@
</span><span class="cx"> */
</span><span class="cx"> function wp_get_attachment_thumb_file( $post_id = 0 ) {
</span><span class="cx">         $post_id = (int) $post_id;
</span><del>-        if ( !$post =& get_post( $post_id ) )
</del><ins>+        if ( !$post = get_post( $post_id ) )
</ins><span class="cx">                 return false;
</span><span class="cx">         if ( !is_array( $imagedata = wp_get_attachment_metadata( $post->ID ) ) )
</span><span class="cx">                 return false;
</span><span class="lines">@@ -4113,7 +4113,7 @@
</span><span class="cx"> */
</span><span class="cx"> function wp_get_attachment_thumb_url( $post_id = 0 ) {
</span><span class="cx">         $post_id = (int) $post_id;
</span><del>-        if ( !$post =& get_post( $post_id ) )
</del><ins>+        if ( !$post = get_post( $post_id ) )
</ins><span class="cx">                 return false;
</span><span class="cx">         if ( !$url = wp_get_attachment_url( $post->ID ) )
</span><span class="cx">                 return false;
</span><span class="lines">@@ -4140,7 +4140,7 @@
</span><span class="cx"> */
</span><span class="cx"> function wp_attachment_is_image( $post_id = 0 ) {
</span><span class="cx">         $post_id = (int) $post_id;
</span><del>-        if ( !$post =& get_post( $post_id ) )
</del><ins>+        if ( !$post = get_post( $post_id ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         if ( !$file = get_attached_file( $post->ID ) )
</span><span class="lines">@@ -4171,7 +4171,7 @@
</span><span class="cx">                 $post_mimes = array();
</span><span class="cx">                 if ( is_numeric($mime) ) {
</span><span class="cx">                         $mime = (int) $mime;
</span><del>-                        if ( $post =& get_post( $mime ) ) {
</del><ins>+                        if ( $post = get_post( $mime ) ) {
</ins><span class="cx">                                 $post_id = (int) $post->ID;
</span><span class="cx">                                 $ext = preg_replace('/^.+?\.([^.]+)$/', '$1', $post->guid);
</span><span class="cx">                                 if ( !empty($ext) ) {
</span></span></pre></div>
<a id="trunkwpincludesqueryphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/query.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/query.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-includes/query.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -2128,7 +2128,7 @@
</span><span class="cx">                                 $q['pagename'] = sanitize_title_for_query( wp_basename( $q['pagename'] ) );
</span><span class="cx">                                 $q['name'] = $q['pagename'];
</span><span class="cx">                                 $where .= " AND ($wpdb->posts.ID = '$reqpage')";
</span><del>-                                $reqpage_obj = get_page($reqpage);
</del><ins>+                                $reqpage_obj = get_post( $reqpage );
</ins><span class="cx">                                 if ( is_object($reqpage_obj) && 'attachment' == $reqpage_obj->post_type ) {
</span><span class="cx">                                         $this->is_attachment = true;
</span><span class="cx">                                         $post_type = $q['post_type'] = 'attachment';
</span><span class="lines">@@ -2975,7 +2975,7 @@
</span><span class="cx">                         $this->queried_object = get_post_type_object( $this->get('post_type') );
</span><span class="cx">                 } elseif ( $this->is_posts_page ) {
</span><span class="cx">                         $page_for_posts = get_option('page_for_posts');
</span><del>-                        $this->queried_object = get_page( $page_for_posts );
</del><ins>+                        $this->queried_object = get_post( $page_for_posts );
</ins><span class="cx">                         $this->queried_object_id = (int) $this->queried_object->ID;
</span><span class="cx">                 } elseif ( $this->is_singular && !is_null($this->post) ) {
</span><span class="cx">                         $this->queried_object = $this->post;
</span></span></pre></div>
<a id="trunkwpincludestaxonomyphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/taxonomy.php (21596 => 21597)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/taxonomy.php        2012-08-23 19:28:58 UTC (rev 21596)
+++ trunk/wp-includes/taxonomy.php        2012-08-23 20:01:10 UTC (rev 21597)
</span><span class="lines">@@ -3073,10 +3073,7 @@
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><span class="cx"> function get_the_taxonomies($post = 0, $args = array() ) {
</span><del>-        if ( is_int($post) )
-                $post =& get_post($post);
-        elseif ( !is_object($post) )
-                $post =& $GLOBALS['post'];
</del><ins>+        $post = get_post( $post );
</ins><span class="cx">
</span><span class="cx">         $args = wp_parse_args( $args, array(
</span><span class="cx">                 'template' => '%s: %l.',
</span><span class="lines">@@ -3122,7 +3119,7 @@
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><span class="cx"> function get_post_taxonomies($post = 0) {
</span><del>-        $post =& get_post($post);
</del><ins>+        $post = get_post( $post );
</ins><span class="cx">
</span><span class="cx">         return get_object_taxonomies($post);
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>