Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/09/2019 06:29:34 PM (5 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/template-functions.php

    r6865 r6930  
    650650        $view_args = bbp_get_view_query_args( $bbp_view );
    651651
    652         // Bail if view args is false (view isn't registered)
    653         if ( false === $view_args ) {
     652        // Bail if view args are empty
     653        if ( empty( $view_args ) ) {
    654654            $posts_query->bbp_is_404 = true;
    655655            return;
Note: See TracChangeset for help on using the changeset viewer.