bp_is_page() and $bp[‘currrent_userid’] purpose
-
I’m trying to find out why ‘news’ from the member theme gets 404 on a blog. I decide to disable it temporarily and find code in the member theme header.php that goes something like this:
...if (bp_is_page('news')) {class="selected"} ...
OK, I get that part. If news is the current page in the member theme, highlight the button. Inside bp_is_page() is a detection of
if ($bp['current_userid'])
then don’t highlight it.What is
$bp['current_userid']
? It seems to be a companion of$bp['loggedin_userid']
but it’s only valid in the member theme. We’ve got like 100 refs in code to ‘current_userid’ and 200 or so for ‘loggedin_userid’.Some bp functions use ‘current_userid’ and some ‘loggedin_userid’. I’m confused as to when, where and why I can, should and shouldn’t use these things.
Anybody have any clarification? It’d be appreciated.
- The topic ‘bp_is_page() and $bp[‘currrent_userid’] purpose’ is closed to new replies.