Changeset 6930
- Timestamp:
- 11/09/2019 06:29:34 PM (5 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/template.php
r6822 r6930 970 970 } elseif ( bbp_is_single_view() ) { 971 971 $bbp_classes[] = 'bbp-view'; 972 $bbp_classes[] = 'bbp-view-' . bbp_get_view_id(); 972 973 973 974 /** User ******************************************************************/ … … 1980 1981 $bbp = bbpress(); 1981 1982 1983 // User supplied string 1982 1984 if ( ! empty( $view ) ) { 1983 $view = sanitize_title( $view ); 1985 $view_id = sanitize_key( $view ); 1986 1987 // Current view ID 1984 1988 } elseif ( ! empty( $bbp->current_view_id ) ) { 1985 $view = $bbp->current_view_id; 1989 $view_id = $bbp->current_view_id; 1990 1991 // Querying for view 1986 1992 } else { 1987 $view = get_query_var( bbp_get_view_rewrite_id() ); 1988 } 1989 1990 if ( array_key_exists( $view, $bbp->views ) ) { 1991 return $view; 1992 } 1993 1994 return false; 1993 $view_id = get_query_var( bbp_get_view_rewrite_id() ); 1994 } 1995 1996 // Filter & return 1997 return apply_filters( 'bbp_get_view_id', $view_id, $view ); 1995 1998 } 1996 1999 -
trunk/src/includes/core/functions.php
r6573 r6930 268 268 $retval = ! empty( $view ) && ! empty( $bbp->views[ $view ] ) 269 269 ? $bbp->views[ $view ]['query'] 270 : false;270 : array(); 271 271 272 272 // 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 ); 274 274 } 275 275 -
trunk/src/includes/core/template-functions.php
r6865 r6930 650 650 $view_args = bbp_get_view_query_args( $bbp_view ); 651 651 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 ) ) { 654 654 $posts_query->bbp_is_404 = true; 655 655 return;
Note: See TracChangeset
for help on using the changeset viewer.