Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 8 years ago

#2769 closed enhancement (fixed)

function to get the forum id, no matter what the post type is

Reported by: grosbouff Owned by: johnjamesjacoby
Priority: normal Milestone: 2.6
Component: Tools - Code Improvements Version:
Severity: normal Keywords:
Cc:

Description

Hi,

There should be a function to get the forum id, no matter what the post type is (forum, topic or reply).
This could be used several times in the bbPress core code (where there is a check with a

switch ( get_post_type( $post_id ) ) {
    ...
    case bbp_get_reply_post_type() :
    ...
    case bbp_get_topic_post_type() :
    ...
    case bbp_get_forum_post_type() :
    ...
}

and could be useful in plugins too.

Thanks !

Change History (3)

#1 @johnjamesjacoby
11 years ago

  • Component GeneralComponent - Forums
  • Keywords needs-patch added
  • Milestone Awaiting ReviewUnder Consideration
  • Type defectenhancement

This makes sense. Same is probably true for topics & replies.

#2 @johnjamesjacoby
8 years ago

  • Component Component - ForumsTools - Code Improvements
  • Keywords needs-patch removed
  • Milestone Under Consideration2.6
  • Owner set to johnjamesjacoby

#3 @johnjamesjacoby
8 years ago

  • Resolutionfixed
  • Status newclosed

In 6814:

Common: introduce bbp_get_post_types() and use where appropriate.

Fixes #2769.

Note: See TracTickets for help on using tickets.