<!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>[21792] trunk/wp-includes: Remove unnecessary return by refs.</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/21792">21792</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2012-09-10 17:00:11 +0000 (Mon, 10 Sep 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove unnecessary return by refs. Props wonderboymusic. fixes <a href="http://core.trac.wordpress.org/ticket/21839">#21839</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludescategoryphp">trunk/wp-includes/category.php</a></li>
<li><a href="#trunkwpincludesclassoembedphp">trunk/wp-includes/class-oembed.php</a></li>
<li><a href="#trunkwpincludescommentphp">trunk/wp-includes/comment.php</a></li>
<li><a href="#trunkwpincludeshttpphp">trunk/wp-includes/http.php</a></li>
<li><a href="#trunkwpincludesl10nphp">trunk/wp-includes/l10n.php</a></li>
<li><a href="#trunkwpincludespomomophp">trunk/wp-includes/pomo/mo.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="trunkwpincludescategoryphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/category.php (21791 => 21792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/category.php        2012-09-10 16:45:49 UTC (rev 21791)
+++ trunk/wp-includes/category.php        2012-09-10 17:00:11 UTC (rev 21792)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> * @param string|array $args Optional. Change the defaults retrieving categories.
</span><span class="cx"> * @return array List of categories.
</span><span class="cx"> */
</span><del>-function &get_categories( $args = '' ) {
</del><ins>+function get_categories( $args = '' ) {
</ins><span class="cx">         $defaults = array( 'taxonomy' => 'category' );
</span><span class="cx">         $args = wp_parse_args( $args, $defaults );
</span><span class="cx">
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
</span><span class="cx"> * @return mixed Category data in type defined by $output parameter.
</span><span class="cx"> */
</span><del>-function &get_category( $category, $output = OBJECT, $filter = 'raw' ) {
</del><ins>+function get_category( $category, $output = OBJECT, $filter = 'raw' ) {
</ins><span class="cx">         $category = get_term( $category, 'category', $output, $filter );
</span><span class="cx">         if ( is_wp_error( $category ) )
</span><span class="cx">                 return $category;
</span><span class="lines">@@ -249,7 +249,7 @@
</span><span class="cx"> * @param string|array $args Tag arguments to use when retrieving tags.
</span><span class="cx"> * @return array List of tags.
</span><span class="cx"> */
</span><del>-function &get_tags( $args = '' ) {
</del><ins>+function get_tags( $args = '' ) {
</ins><span class="cx">         $tags = get_terms( 'post_tag', $args );
</span><span class="cx">
</span><span class="cx">         if ( empty( $tags ) ) {
</span><span class="lines">@@ -280,7 +280,7 @@
</span><span class="cx"> * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
</span><span class="cx"> * @return object|array Return type based on $output value.
</span><span class="cx"> */
</span><del>-function &get_tag( $tag, $output = OBJECT, $filter = 'raw' ) {
</del><ins>+function get_tag( $tag, $output = OBJECT, $filter = 'raw' ) {
</ins><span class="cx">         return get_term( $tag, 'post_tag', $output, $filter );
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesclassoembedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-oembed.php (21791 => 21792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-oembed.php        2012-09-10 16:45:49 UTC (rev 21791)
+++ trunk/wp-includes/class-oembed.php        2012-09-10 17:00:11 UTC (rev 21792)
</span><span class="lines">@@ -296,7 +296,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return WP_oEmbed object.
</span><span class="cx"> */
</span><del>-function &_wp_oembed_get_object() {
</del><ins>+function _wp_oembed_get_object() {
</ins><span class="cx">         static $wp_oembed;
</span><span class="cx">
</span><span class="cx">         if ( is_null($wp_oembed) )
</span></span></pre></div>
<a id="trunkwpincludescommentphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/comment.php (21791 => 21792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/comment.php        2012-09-10 16:45:49 UTC (rev 21791)
+++ trunk/wp-includes/comment.php        2012-09-10 17:00:11 UTC (rev 21792)
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> * @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants.
</span><span class="cx"> * @return object|array|null Depends on $output value.
</span><span class="cx"> */
</span><del>-function &get_comment(&$comment, $output = OBJECT) {
</del><ins>+function get_comment(&$comment, $output = OBJECT) {
</ins><span class="cx">         global $wpdb;
</span><span class="cx">         $null = null;
</span><span class="cx">
</span><span class="lines">@@ -723,7 +723,7 @@
</span><span class="cx"> * @param array $comments Array of comments
</span><span class="cx"> * @return array Array of comments keyed by comment_type.
</span><span class="cx"> */
</span><del>-function &separate_comments(&$comments) {
</del><ins>+function separate_comments(&$comments) {
</ins><span class="cx">         $comments_by_type = array('comment' => array(), 'trackback' => array(), 'pingback' => array(), 'pings' => array());
</span><span class="cx">         $count = count($comments);
</span><span class="cx">         for ( $i = 0; $i < $count; $i++ ) {
</span></span></pre></div>
<a id="trunkwpincludeshttpphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/http.php (21791 => 21792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/http.php        2012-09-10 16:45:49 UTC (rev 21791)
+++ trunk/wp-includes/http.php        2012-09-10 17:00:11 UTC (rev 21792)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @return WP_Http HTTP Transport object.
</span><span class="cx"> */
</span><del>-function &_wp_http_get_object() {
</del><ins>+function _wp_http_get_object() {
</ins><span class="cx">         static $http;
</span><span class="cx">
</span><span class="cx">         if ( is_null($http) )
</span></span></pre></div>
<a id="trunkwpincludesl10nphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/l10n.php (21791 => 21792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/l10n.php        2012-09-10 16:45:49 UTC (rev 21791)
+++ trunk/wp-includes/l10n.php        2012-09-10 17:00:11 UTC (rev 21792)
</span><span class="lines">@@ -493,7 +493,7 @@
</span><span class="cx"> * @param string $domain
</span><span class="cx"> * @return object A Translation instance
</span><span class="cx"> */
</span><del>-function &get_translations_for_domain( $domain ) {
</del><ins>+function get_translations_for_domain( $domain ) {
</ins><span class="cx">         global $l10n;
</span><span class="cx">         if ( !isset( $l10n[$domain] ) ) {
</span><span class="cx">                 $l10n[$domain] = new NOOP_Translations;
</span></span></pre></div>
<a id="trunkwpincludespomomophp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/pomo/mo.php (21791 => 21792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/pomo/mo.php        2012-09-10 16:45:49 UTC (rev 21791)
+++ trunk/wp-includes/pomo/mo.php        2012-09-10 17:00:11 UTC (rev 21792)
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx">          * @param string $translation translation string from MO file. Might contain
</span><span class="cx">          *         0x00 as a plural translations separator
</span><span class="cx">          */
</span><del>-        function &make_entry($original, $translation) {
</del><ins>+        function make_entry($original, $translation) {
</ins><span class="cx">                 $entry = new Translation_Entry();
</span><span class="cx">                 // look for context
</span><span class="cx">                 $parts = explode(chr(4), $original);
</span></span></pre></div>
<a id="trunkwpincludespostphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post.php (21791 => 21792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post.php        2012-09-10 16:45:49 UTC (rev 21791)
+++ trunk/wp-includes/post.php        2012-09-10 17:00:11 UTC (rev 21792)
</span><span class="lines">@@ -3370,7 +3370,7 @@
</span><span class="cx"> * @param array $pages List of pages' objects.
</span><span class="cx"> * @return array
</span><span class="cx"> */
</span><del>-function &get_page_children($page_id, $pages) {
</del><ins>+function get_page_children($page_id, $pages) {
</ins><span class="cx">         $page_list = array();
</span><span class="cx">         foreach ( (array) $pages as $page ) {
</span><span class="cx">                 if ( $page->post_parent == $page_id ) {
</span><span class="lines">@@ -3394,7 +3394,7 @@
</span><span class="cx"> * @param int $page_id Parent page ID.
</span><span class="cx"> * @return array A list arranged by hierarchy. Children immediately follow their parents.
</span><span class="cx"> */
</span><del>-function &get_page_hierarchy( &$pages, $page_id = 0 ) {
</del><ins>+function get_page_hierarchy( &$pages, $page_id = 0 ) {
</ins><span class="cx">         if ( empty( $pages ) ) {
</span><span class="cx">                 $result = array();
</span><span class="cx">                 return $result;
</span><span class="lines">@@ -3462,7 +3462,7 @@
</span><span class="cx"> * @param mixed $args Optional. Array or string of options that overrides defaults.
</span><span class="cx"> * @return array List of pages matching defaults or $args
</span><span class="cx"> */
</span><del>-function &get_pages($args = '') {
</del><ins>+function get_pages($args = '') {
</ins><span class="cx">         global $wpdb;
</span><span class="cx">
</span><span class="cx">         $pages = false;
</span><span class="lines">@@ -4950,7 +4950,7 @@
</span><span class="cx"> * @param string $filter Optional sanitation filter. @see sanitize_post()
</span><span class="cx"> * @return mixed Null if error or post object if success
</span><span class="cx"> */
</span><del>-function &wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
</del><ins>+function wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
</ins><span class="cx">         $null = null;
</span><span class="cx">         if ( !$revision = get_post( $post, OBJECT, $filter ) )
</span><span class="cx">                 return $revision;
</span></span></pre></div>
<a id="trunkwpincludesqueryphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/query.php (21791 => 21792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/query.php        2012-09-10 16:45:49 UTC (rev 21791)
+++ trunk/wp-includes/query.php        2012-09-10 17:00:11 UTC (rev 21792)
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> * @param string $query
</span><span class="cx"> * @return array List of posts
</span><span class="cx"> */
</span><del>-function &query_posts($query) {
</del><ins>+function query_posts($query) {
</ins><span class="cx">         unset($GLOBALS['wp_query']);
</span><span class="cx">         $GLOBALS['wp_query'] = new WP_Query();
</span><span class="cx">         return $GLOBALS['wp_query']->query($query);
</span><span class="lines">@@ -1916,7 +1916,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @return array List of posts.
</span><span class="cx">          */
</span><del>-        function &get_posts() {
</del><ins>+        function get_posts() {
</ins><span class="cx">                 global $wpdb, $user_ID, $_wp_using_ext_object_cache;
</span><span class="cx">
</span><span class="cx">                 $this->parse_query();
</span><span class="lines">@@ -2936,7 +2936,7 @@
</span><span class="cx">          * @param string $query URL query string.
</span><span class="cx">          * @return array List of posts.
</span><span class="cx">          */
</span><del>-        function &query( $query ) {
</del><ins>+        function query( $query ) {
</ins><span class="cx">                 $this->init();
</span><span class="cx">                 $this->query = $this->query_vars = wp_parse_args( $query );
</span><span class="cx">                 return $this->get_posts();
</span></span></pre></div>
<a id="trunkwpincludestaxonomyphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/taxonomy.php (21791 => 21792)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/taxonomy.php        2012-09-10 16:45:49 UTC (rev 21791)
+++ trunk/wp-includes/taxonomy.php        2012-09-10 17:00:11 UTC (rev 21792)
</span><span class="lines">@@ -861,7 +861,7 @@
</span><span class="cx"> * @return mixed|null|WP_Error Term Row from database. Will return null if $term is empty. If taxonomy does not
</span><span class="cx"> * exist then WP_Error will be returned.
</span><span class="cx"> */
</span><del>-function &get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') {
</del><ins>+function get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') {
</ins><span class="cx">         global $wpdb;
</span><span class="cx">         $null = null;
</span><span class="cx">
</span><span class="lines">@@ -1178,7 +1178,7 @@
</span><span class="cx"> * @param string|array $args The values of what to search for when returning terms
</span><span class="cx"> * @return array|WP_Error List of Term Objects and their children. Will return WP_Error, if any of $taxonomies do not exist.
</span><span class="cx"> */
</span><del>-function &get_terms($taxonomies, $args = '') {
</del><ins>+function get_terms($taxonomies, $args = '') {
</ins><span class="cx">         global $wpdb;
</span><span class="cx">         $empty_array = array();
</span><span class="cx">
</span><span class="lines">@@ -2637,7 +2637,7 @@
</span><span class="cx"> * @param string $taxonomy Taxonomy Name
</span><span class="cx"> * @return bool|array Empty array if $terms found, but not $taxonomy. False if nothing is in cache for $taxonomy and $id.
</span><span class="cx"> */
</span><del>-function &get_object_term_cache($id, $taxonomy) {
</del><ins>+function get_object_term_cache($id, $taxonomy) {
</ins><span class="cx">         $cache = wp_cache_get($id, "{$taxonomy}_relationships");
</span><span class="cx">         return $cache;
</span><span class="cx"> }
</span><span class="lines">@@ -2783,7 +2783,7 @@
</span><span class="cx"> * @param string $taxonomy The taxonomy which determines the hierarchy of the terms.
</span><span class="cx"> * @return array The subset of $terms that are descendants of $term_id.
</span><span class="cx"> */
</span><del>-function &_get_term_children($term_id, $terms, $taxonomy) {
</del><ins>+function _get_term_children($term_id, $terms, $taxonomy) {
</ins><span class="cx">         $empty_array = array();
</span><span class="cx">         if ( empty($terms) )
</span><span class="cx">                 return $empty_array;
</span></span></pre>
</div>
</div>
</body>
</html>