[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
BuddyPress Forums Functions.
File Size: | 1155 lines (37 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
bp_forums_is_bbpress_active() X-Ref |
Is see bbPress 2.x is installed and active? return: boolean True if bbPress 2.x is active, false if not. since: 1.6.0 |
bp_forums_is_installed_correctly() X-Ref |
See if bbPress 1.x is installed correctly. "Installed correctly" means that the bb-config-location option is set, and the referenced file exists. return: boolean True if option exists, false if not. since: 1.2.0 |
bp_forums_has_directory() X-Ref |
Does the forums component have a directory page registered? Checks $bp pages global and looks for directory page. return: bool True if set, False if empty. since: 1.5.0 |
bp_forums_get_forum( $forum_id ) X-Ref |
Get a forum by ID. Wrapper for {@link bb_get_forum()}. param: int $forum_id ID of the forum being fetched. return: object bbPress forum object. since: 1.0.0 |
bp_forums_new_forum( $args = '' ) X-Ref |
Create a forum. Wrapper for {@link bb_new_forum()}. param: array|string $args { return: int ID of the newly created forum. since: 1.0.0 |
bp_forums_update_forum( $args = '' ) X-Ref |
Update a forum. Wrapper for {@link bb_update_forum(}. param: array|string $args { return: bool True on success, false on failure. since: 1.2.5 |
bp_forums_delete_group_forum( $group_id ) X-Ref |
Delete a group forum by the group id. param: int $group_id ID of the group whose forum is to be deleted. since: 1.6.0 |
bp_forums_get_forum_topics( $args = '' ) X-Ref |
Fetch a set of forum topics. param: array|string $args { return: array Found topics. since: 1.1.0 |
bp_forums_get_topic_details( $topic_id ) X-Ref |
Get additional details about a given forum topic. param: int $topic_id ID of the topic for which you're fetching details. return: object Details about the topic. since: 1.0.0 |
bp_forums_get_topic_id_from_slug( $topic_slug ) X-Ref |
Get the numeric ID of a topic from the topic slug. Wrapper for {@link bb_get_id_from_slug()}. param: string $topic_slug Slug of the topic. return: int|bool ID of the topic (if found), false on failure. since: 1.1.0 |
bp_forums_new_topic( $args = '' ) X-Ref |
Create a new forum topic. param: array|string $args { return: object Details about the new topic, as returned by since: 1.0.0 |
bp_forums_update_topic( $args = '' ) X-Ref |
Update a topic's details. param: array|string $args { return: object Details about the new topic, as returned by since: 1.1.0 |
bp_forums_sticky_topic( $args = '' ) X-Ref |
Set a topic as sticky/unsticky. param: string $args Array of arguments for sticky topic. return: bool since: 1.1.0 |
bp_forums_openclose_topic( $args = '' ) X-Ref |
Set a topic's open/closed status. param: array|string $args { return: bool True on success, false on failure. since: 1.1.0 |
bp_forums_delete_topic( $args = '' ) X-Ref |
Delete a topic. param: array|string $args { return: bool True on success, false on failure. since: 1.1.0 |
bp_forums_total_topic_count() X-Ref |
Get a count of the total topics on the site. return: int $count Total topic count. since: 1.2.0 |
bp_forums_reply_exists( $text = '', $topic_id = 0, $user_id = 0 ) X-Ref |
Check to see whether a user has already left this particular reply on a given post. Used to prevent dupes. param: string $text The text of the comment. param: int $topic_id The topic id. param: int $user_id The user id. return: bool True if a duplicate reply exists, otherwise false. since: 1.6.0 |
_bp_forums_reply_exists_posts_where( $where = '' ) X-Ref |
Private one-time-use function used in conjunction with bp_forums_reply_exists(). param: string $where SQL fragment. return: string SQL fragment. since: 1.7.0 |
bp_forums_total_topic_count_for_user( $user_id = 0, $type = 'active' ) X-Ref |
Get a total "Topics Started" count for a given user. param: int $user_id ID of the user being queried. Falls back on displayed param: string $type The current filter/sort type. 'active', 'popular', return: int $count The topic count. since: 1.2.0 |
bp_forums_total_replied_count_for_user( $user_id = 0, $type = 'active' ) X-Ref |
Return the total number of topics replied to by a given user. Uses an unfortunate technique to count unique topics, due to limitations in BB_Query. param: int $user_id ID of the user whose replied topics are being counted. param: string $type Forum thread type. return: int $count Topic count. since: 1.5.0 |
bp_forums_get_topic_extras( $topics ) X-Ref |
Fetch BP-specific details for an array of topics. Done in one fell swoop to reduce query overhead. Currently determines the following: - details about the last poster - information about topic users that may have been deleted/spammed param: array $topics Array of topics. return: array $topics Topics with BP details added. since: 1.2.0 |
bp_forums_get_topic_posts( $args = '' ) X-Ref |
Get the posts belonging to a topic. param: array|string $args { return: array List of posts. since: 1.1.0 |
bp_forums_get_post( $post_id ) X-Ref |
Get a single post object by ID. Wrapper for {@link bb_get_post()}. param: int $post_id ID of the post being fetched. return: object Post object. since: 1.0.0 |
bp_forums_delete_post( $args = '' ) X-Ref |
Delete a post. Wrapper for {@link bb_delete_post()}. param: array|string $args { return: bool True on success, false on failure. since: 1.1.0 |
bp_forums_insert_post( $args = '' ) X-Ref |
Create a new post. param: array|string $args { return: int|bool ID of the new post on success, false on failure. since: 1.1.0 |
bp_forums_get_post_extras( $posts ) X-Ref |
Get BP-specific details about a set of posts. Currently fetches the following: - WP userdata for each poster - BP fullname for each poster param: array $posts List of posts. return: array Posts with BP-data added. since: 1.2.0 |
bp_forums_get_forum_topicpost_count( $forum_id ) X-Ref |
Get topic and post counts for a given forum. param: int $forum_id ID of the forum. return: object Object with properties $topics (topic count) and $posts since: 1.1.0 |
bp_forums_filter_caps( $allcaps ) X-Ref |
Map WordPress caps onto bbPress users, to ensure that they can post. param: array $allcaps Array of capabilities. return: array Caps array with bbPress caps added. since: 1.1.0 |
bp_forums_parent_forum_id() X-Ref |
Return the parent forum ID for the bbPress abstraction layer. return: int Forum ID. since: 1.5.0 |
bp_forums_enable_global_directory_stickies() X-Ref |
Should sticky topics be broken out of regular topic order on forum directories? Defaults to false. Define BP_FORUMS_ENABLE_GLOBAL_DIRECTORY_STICKIES, or filter 'bp_forums_enable_global_directory_stickies', to change this behavior. return: bool True if stickies should be displayed at the top of the global since: 1.5.0 |
bp_forums_embed() X-Ref |
Attempt to retrieve the oEmbed cache for a forum topic. Grabs the topic post ID and attempts to retrieve the oEmbed cache (if it exists) during the forum topic loop. If no cache and link is embeddable, cache it. since: 1.5.0 |
bp_embed_forum_cache( $cache, $id, $cachekey ) X-Ref |
Used during {@link BP_Embed::parse_oembed()} via {@link bp_forums_embed()}. Wrapper function for {@link bb_get_postmeta()}. param: object $cache Cache object. param: int $id ID of the forum being cached. param: string $cachekey Key to use with forum embed cache. since: 1.5.0 |
bp_embed_forum_save_cache( $cache, $cachekey, $id ) X-Ref |
Used during {@link BP_Embed::parse_oembed()} via {@link bp_forums_embed()}. Wrapper function for {@link bb_update_postmeta()}. param: object $cache Cache object. param: string $cachekey Key to use with forum embed cache. param: int $id ID of the forum being cached. since: 1.5.0 |
Generated: Thu Dec 7 01:01:35 2017 | Cross-referenced by PHPXref 0.7.1 |