Skip to:
Content

bbPress.org

Changeset 3950


Ignore:
Timestamp:
06/12/2012 06:46:31 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Topic Views:

  • Prevent possible byref object errors in bbp_register_view().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-core-functions.php

    r3899 r3950  
    154154 */
    155155function bbp_register_view( $view, $title, $query_args = '', $feed = true ) {
    156     $bbp   = bbpress();
     156    $views = bbpress()->views;
    157157    $view  = sanitize_title( $view );
    158158    $title = esc_html( $title );
     
    167167        $query_args['show_stickies'] = false;
    168168
    169     $bbp->views[$view]['title'] = $title;
    170     $bbp->views[$view]['query'] = $query_args;
    171     $bbp->views[$view]['feed']  = $feed;
    172 
    173     return $bbp->views[$view];
     169    $views[$view] = array(
     170        'title'  => $title,
     171        'query'  => $query_args,
     172        'feed'   => $feed
     173    );
     174
     175    return $views[$view];
    174176}
    175177
Note: See TracChangeset for help on using the changeset viewer.