agree, it seems to be a bug.
I have lodged a trac ticket
https://bbpress.trac.wordpress.org/ticket/3230
I’ll see how easy it is to filter for a temporary fix
try this filter
//make sure scheduled stickies don't show - pending fix by bbpress
add_filter ('bbp_get_stickies', 'rew_get_stickies' , 10 , 2) ;
function rew_get_stickies ($stickies, $forum_id ) {
$return = array () ;
//check if any are future
foreach ($stickies as $sticky) {
if (get_post_status( $sticky ) !='future')
array_push ($return, $sticky) ;
}
return $return ;
}
Thank you, @robin-w!
So I found found the cause of the bug. There is a typo on line 303 of the “bbpress/includes/topics/template.php” file in the latest version of bbPress (2.5.14). It tries to set the “post_status” query value to “readable”. This is an invalid value for “post_status”. What the programmer intended was to set the “perm” query value to “readable”.
Here is the incorrect piece of code that is currently there:
// Lean on the 'perm' query var value of 'readable' to provide statuses
} else {
$sticky_query['post_status'] = $r['perm'];
}
And here is how the code should read:
// Lean on the 'perm' query var value of 'readable' to provide statuses
} else {
$sticky_query['perm'] = $r['perm'];
}
so 303 should read
$sticky_query['perm'] = $r['perm'];
yes ?
Correct! Changing line 303 to what you put above does fix the issue.
looking at 2.6 rc5 I think this is fixed in this version which will hopefully be a live version soon.
I doubt that 2.5.14 will get this fix.
This typo still exists, which continues to publicly display Private or Scheduled sticky posts in the latest version of bbPress 2.6.4.
It can be easily fixed by correcting line 404 of the “bbpress/includes/topics/template.php” file to set $sticky_query[‘perm’] instead of $sticky_query[‘post_status’].
This is the correct code that works:
// Allowed statuses, or lean on the 'perm' argument (probably 'readable')
$sticky_query['perm'] = bbp_get_view_all( 'edit_others_topics' ) ?
$r['post_status']
: $r['perm'];