Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/09/2019 06:29:34 PM (6 years ago)
Author:
johnjamesjacoby
Message:

Topic Views: pass view ID into body class.

This commit does a quick audit of Topic View API functions, and ensures their return values are as documented. This allows for safely adding the Topic View ID as a class to the body element of the page when viewing a single Topic View.

Fixes #3278. Props Clorith.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/functions.php

    r6573 r6930  
    268268    $retval = ! empty( $view ) && ! empty( $bbp->views[ $view ] )
    269269        ? $bbp->views[ $view ]['query']
    270         : false;
     270        : array();
    271271
    272272    // Filter & return
    273     return apply_filters( 'bbp_get_view_query_args', $retval, $view );
     273    return (array) apply_filters( 'bbp_get_view_query_args', $retval, $view );
    274274}
    275275
Note: See TracChangeset for help on using the changeset viewer.