Changeset 6930 for trunk/src/includes/common/template.php
- Timestamp:
- 11/09/2019 06:29:34 PM (5 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.