Make WordPress Core

Changeset 21792


Ignore:
Timestamp:
09/10/2012 05:00:11 PM (12 years ago)
Author:
ryan
Message:

Remove unnecessary return by refs. Props wonderboymusic. fixes #21839

Location:
trunk/wp-includes
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category.php

    r19712 r21792  
    3737 * @return array List of categories.
    3838 */
    39 function &get_categories( $args = '' ) {
     39function get_categories( $args = '' ) {
    4040    $defaults = array( 'taxonomy' => 'category' );
    4141    $args = wp_parse_args( $args, $defaults );
     
    7979 * @return mixed Category data in type defined by $output parameter.
    8080 */
    81 function &get_category( $category, $output = OBJECT, $filter = 'raw' ) {
     81function get_category( $category, $output = OBJECT, $filter = 'raw' ) {
    8282    $category = get_term( $category, 'category', $output, $filter );
    8383    if ( is_wp_error( $category ) )
     
    250250 * @return array List of tags.
    251251 */
    252 function &get_tags( $args = '' ) {
     252function get_tags( $args = '' ) {
    253253    $tags = get_terms( 'post_tag', $args );
    254254
     
    281281 * @return object|array Return type based on $output value.
    282282 */
    283 function &get_tag( $tag, $output = OBJECT, $filter = 'raw' ) {
     283function get_tag( $tag, $output = OBJECT, $filter = 'raw' ) {
    284284    return get_term( $tag, 'post_tag', $output, $filter );
    285285}
  • trunk/wp-includes/class-oembed.php

    r21701 r21792  
    297297 * @return WP_oEmbed object.
    298298 */
    299 function &_wp_oembed_get_object() {
     299function _wp_oembed_get_object() {
    300300    static $wp_oembed;
    301301
  • trunk/wp-includes/comment.php

    r21599 r21792  
    128128 * @return object|array|null Depends on $output value.
    129129 */
    130 function &get_comment(&$comment, $output = OBJECT) {
     130function get_comment(&$comment, $output = OBJECT) {
    131131    global $wpdb;
    132132    $null = null;
     
    724724 * @return array Array of comments keyed by comment_type.
    725725 */
    726 function &separate_comments(&$comments) {
     726function separate_comments(&$comments) {
    727727    $comments_by_type = array('comment' => array(), 'trackback' => array(), 'pingback' => array(), 'pings' => array());
    728728    $count = count($comments);
  • trunk/wp-includes/http.php

    r20794 r21792  
    2020 * @return WP_Http HTTP Transport object.
    2121 */
    22 function &_wp_http_get_object() {
     22function _wp_http_get_object() {
    2323    static $http;
    2424
  • trunk/wp-includes/l10n.php

    r21109 r21792  
    494494 * @return object A Translation instance
    495495 */
    496 function &get_translations_for_domain( $domain ) {
     496function get_translations_for_domain( $domain ) {
    497497    global $l10n;
    498498    if ( !isset( $l10n[$domain] ) ) {
  • trunk/wp-includes/pomo/mo.php

    r19072 r21792  
    216216     *  0x00 as a plural translations separator
    217217     */
    218     function &make_entry($original, $translation) {
     218    function make_entry($original, $translation) {
    219219        $entry = new Translation_Entry();
    220220        // look for context
  • trunk/wp-includes/post.php

    r21783 r21792  
    33713371 * @return array
    33723372 */
    3373 function &get_page_children($page_id, $pages) {
     3373function get_page_children($page_id, $pages) {
    33743374    $page_list = array();
    33753375    foreach ( (array) $pages as $page ) {
     
    33953395 * @return array A list arranged by hierarchy. Children immediately follow their parents.
    33963396 */
    3397 function &get_page_hierarchy( &$pages, $page_id = 0 ) {
     3397function get_page_hierarchy( &$pages, $page_id = 0 ) {
    33983398    if ( empty( $pages ) ) {
    33993399        $result = array();
     
    34633463 * @return array List of pages matching defaults or $args
    34643464 */
    3465 function &get_pages($args = '') {
     3465function get_pages($args = '') {
    34663466    global $wpdb;
    34673467
     
    49514951 * @return mixed Null if error or post object if success
    49524952 */
    4953 function &wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
     4953function wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
    49544954    $null = null;
    49554955    if ( !$revision = get_post( $post, OBJECT, $filter ) )
  • trunk/wp-includes/query.php

    r21776 r21792  
    8787 * @return array List of posts
    8888 */
    89 function &query_posts($query) {
     89function query_posts($query) {
    9090    unset($GLOBALS['wp_query']);
    9191    $GLOBALS['wp_query'] = new WP_Query();
     
    19171917     * @return array List of posts.
    19181918     */
    1919     function &get_posts() {
     1919    function get_posts() {
    19201920        global $wpdb, $user_ID, $_wp_using_ext_object_cache;
    19211921
     
    29372937     * @return array List of posts.
    29382938     */
    2939     function &query( $query ) {
     2939    function query( $query ) {
    29402940        $this->init();
    29412941        $this->query = $this->query_vars = wp_parse_args( $query );
  • trunk/wp-includes/taxonomy.php

    r21788 r21792  
    862862 * exist then WP_Error will be returned.
    863863 */
    864 function &get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') {
     864function get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') {
    865865    global $wpdb;
    866866    $null = null;
     
    11791179 * @return array|WP_Error List of Term Objects and their children. Will return WP_Error, if any of $taxonomies do not exist.
    11801180 */
    1181 function &get_terms($taxonomies, $args = '') {
     1181function get_terms($taxonomies, $args = '') {
    11821182    global $wpdb;
    11831183    $empty_array = array();
     
    26382638 * @return bool|array Empty array if $terms found, but not $taxonomy. False if nothing is in cache for $taxonomy and $id.
    26392639 */
    2640 function &get_object_term_cache($id, $taxonomy) {
     2640function get_object_term_cache($id, $taxonomy) {
    26412641    $cache = wp_cache_get($id, "{$taxonomy}_relationships");
    26422642    return $cache;
     
    27842784 * @return array The subset of $terms that are descendants of $term_id.
    27852785 */
    2786 function &_get_term_children($term_id, $terms, $taxonomy) {
     2786function _get_term_children($term_id, $terms, $taxonomy) {
    27872787    $empty_array = array();
    27882788    if ( empty($terms) )
Note: See TracChangeset for help on using the changeset viewer.