Skip to:
Content

bbPress.org

Opened 12 months ago

Last modified 12 months ago

#3230 new defect

scheduled stickies appear immediately

Reported by: Robin W Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.0
Component: Component - Topics Keywords: needs-patch needs-unit-tests
Cc:

Description

If you schedule a sticky, it appears in the forum list immediately

<?php
function bbp_get_stickies( $forum_id = 0 ) {
        $stickies = empty( $forum_id ) ? bbp_get_super_stickies() : get_post_meta( $forum_id, '_bbp_sticky_topics', true );
        $stickies = ( empty( $stickies ) || !is_array( $stickies ) ) ? array() : $stickies;

        return apply_filters( 'bbp_get_stickies', $stickies, (int) $forum_id );
}

deos not check to see if status is future

Change History (1)

#1 @johnjamesjacoby
12 months ago

  • Keywords needs-patch needs-unit-tests added
  • Milestone changed from Awaiting Review to Future Release
  • Version set to 2.0

Kind of a known issue.

This is because almost all user activity in bbPress happens theme-side, and the ability to future-date a topic or reply isn't made available as a feature.

Someone wanting to patch this in bbPress core would do something like:

  • Move sticky add/remove to a transition_post_status hook
  • Purge relevant topic & forum hierarchy caches when transitioning

I think it would be nice for this to work, specifically for moderators and admins that use WordPress admin for managing their forums.

Note: See TracTickets for help on using tickets.