[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/src/includes/extend/buddypress/ -> groups.php (summary)

bbPress BuddyPress Group Extension Class This file is responsible for connecting bbPress to the BuddyPress Groups Component. It's a great example of how to perform both simple and advanced techniques to manipulate the default output provided by both.

File Size: 1730 lines (48 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BBP_Forums_Group_Extension:: (49 methods):
  __construct()
  setup_variables()
  setup_actions()
  setup_filters()
  fully_loaded()
  is_single_forum()
  is_single_topic()
  display()
  maybe_unset_forum_menu()
  map_group_forum_meta_caps()
  remove_group_forum_meta_cap_map()
  validate_topic_forum_id()
  validate_reply_to_id()
  edit_screen()
  edit_screen_save()
  group_admin_ui_edit_screen()
  group_admin_ui_display_metabox()
  create_screen()
  create_screen_save()
  ob_start()
  ob_end_clean()
  new_forum()
  remove_forum()
  disconnect_forum_from_group()
  update_group_forum()
  toggle_group_forum()
  display_forums()
  no_super_stickies()
  unset_super_sticky()
  hide_super_sticky_admin_link()
  new_topic_redirect_to()
  new_reply_redirect_to()
  edit_redirect_to()
  forum_parent()
  topic_parent()
  form_permissions()
  group_settings_hidden_field()
  maybe_map_permalink_to_group()
  map_forum_permalink_to_group()
  map_topic_permalink_to_group()
  map_reply_permalink_to_group()
  map_reply_edit_url_to_group()
  post_link()
  page_link()
  post_type_link()
  topic_pagination()
  replies_pagination()
  redirect_canonical()
  map_activity_to_group()


Class: BBP_Forums_Group_Extension  - X-Ref

Loads Group Extension for Forums Component

__construct()   X-Ref
Setup bbPress group extension variables

since: 2.1.0 bbPress (r3552)

setup_variables()   X-Ref
Setup the group forums class variables

since: 2.1.0 bbPress (r3552)

setup_actions()   X-Ref
Setup the group forums class actions

since: 2.3.0 bbPress (r4552)

setup_filters()   X-Ref
Setup the group forums class filters

since: 2.3.0 bbPress (r4552)

fully_loaded()   X-Ref
Allow the variables, actions, and filters to be modified by third party
plugins and themes.

since: 2.6.0 bbPress (r6808)

is_single_forum( $retval = false )   X-Ref
Ensure that bbp_is_single_forum() returns true on group forum pages.

return: bool
since: 2.6.0 bbPress (r6366)
param: bool $retval Current boolean.

is_single_topic( $retval = false )   X-Ref
Ensure that bbp_is_single_topic() returns true on group forum topic pages.

return: bool
since: 2.6.0 bbPress (r6220)
param: bool $retval Current boolean.

display( $group_id = null )   X-Ref
The primary display function for group forums

since: 2.1.0 bbPress (r3746)
param: int $group_id ID of the current group. Available only on BP 2.2+.

maybe_unset_forum_menu()   X-Ref
Maybe unset the group forum nav item if group does not have a forum

return: If not viewing a single group
since: 2.3.0 bbPress (r4552)

map_group_forum_meta_caps( $caps = array()   X-Ref
Allow group members to have advanced privileges in group forum topics.

return: array
since: 2.2.0 bbPress (r4434)
param: array $caps
param: string $cap
param: int $user_id
param: array $args

remove_group_forum_meta_cap_map()   X-Ref
Remove the topic meta cap map, so it doesn't interfere with sidebars.

since: 2.2.0 bbPress (r4434)

validate_topic_forum_id( $topic_id = 0 )   X-Ref
Validate the forum ID for a topic in a group forum.

This method ensures that when a topic is saved, it is only allowed to be
saved to a forum that is either:

- A forum in the current group
- A forum the current user can moderate outside of this group

If all checks fail, an error gets added to prevent the topic from saving.

since: 2.6.14
param: int $topic_id

validate_reply_to_id( $reply_id = 0 )   X-Ref
Validate the reply to for a reply in a group forum.

This method ensures that when a reply to is saved, it is only allowed to
be saved to the current topic.

If all checks fail, an error gets added to prevent the reply from saving.

since: 2.6.14
param: int $reply_id

edit_screen( $group = false )   X-Ref
Show forums and new forum form when editing a group

since: 2.1.0 bbPress (r3563)
param: object $group (the group to edit if in Group Admin UI)

edit_screen_save( $group_id = 0 )   X-Ref
Save the Group Forum data on edit

since: 2.0.0 bbPress (r3465)
param: int $group_id (to handle Group Admin UI hook bp_group_admin_edit_after )

group_admin_ui_edit_screen()   X-Ref
Adds a meta-box to BuddyPress Group Admin UI

since: 2.3.0 bbPress (r4814)

group_admin_ui_display_metabox( $item )   X-Ref
Displays the bbPress meta-box in BuddyPress Group Admin UI

since: 2.3.0 bbPress (r4814)
param: object $item (group object)

create_screen( $group_id = 0 )   X-Ref
Show forums and new forum form when creating a group

since: 2.0.0 bbPress (r3465)

create_screen_save( $group_id = 0 )   X-Ref
Save the Group Forum data on create

since: 2.0.0 bbPress (r3465)

ob_start()   X-Ref
Used to start an output buffer

since: 2.1.0 bbPress (r3746)

ob_end_clean()   X-Ref
Used to end an output buffer

since: 2.1.0 bbPress (r3746)

new_forum( $forum_args = array()   X-Ref
Creating a group forum or category (including root for group)

return: void if no forum_id is available
since: 2.1.0 bbPress (r3653)
param: array $forum_args

remove_forum( $forum_args = array()   X-Ref
Removing a group forum or category (including root for group)

return: void if no forum_id is available
since: 2.1.0 bbPress (r3653)
param: array $forum_args

disconnect_forum_from_group( $group_id = 0 )   X-Ref
Listening to BuddyPress Group deletion to remove the forum

since: 2.3.0 bbPress (r4815)
param: int $group_id The group ID

update_group_forum( BP_Groups_Group $group )   X-Ref
Update forum attributes to match those of the associated group.

Fired whenever a group is saved

since: 2.6.7 bbPress (r7208)
param: BP_Groups_Group $group Group object.

toggle_group_forum( $group_id = 0, $enabled = false )   X-Ref
Toggle the enable_forum group setting on or off

return: False if group is not found, otherwise return the group
since: 2.3.0 bbPress (r4612)
param: int $group_id The group to toggle
param: bool $enabled True for on, false for off

display_forums( $offset = 0 )   X-Ref
Output the forums for a group in the edit screens

As of right now, bbPress only supports 1-to-1 group forum relationships.
In the future, many-to-many should be allowed.

since: 2.1.0 bbPress (r3653)

no_super_stickies( $super = array()   X-Ref
Strip super stickies from the topic query

return: array (empty)
since: 2.3.0 bbPress (r4810)
param: array $super the super sticky post ID's

unset_super_sticky( $args = array()   X-Ref
Unset the type super sticky from topic type

return: array $args without the to-front link
since: 2.3.0 bbPress (r4810)
param: array $args

hide_super_sticky_admin_link( $retval = '', $args = array()   X-Ref
Ugly preg_replace to hide the to front admin link

return: string $retval without the to-front link
since: 2.3.0 bbPress (r4810)
param: string $retval
param: array $args

new_topic_redirect_to( $redirect_url = '', $redirect_to = '', $topic_id = 0 )   X-Ref
Redirect to the group forum screen

since: 2.1.0 bbPress (r3653)
param: str $redirect_url
param: str $redirect_to

new_reply_redirect_to( $redirect_url = '', $redirect_to = '', $reply_id = 0 )   X-Ref
Redirect to the group forum screen

since: 2.1.0 bbPress (r3653)

edit_redirect_to( $redirect_url = '' )   X-Ref
Redirect to the group admin forum edit screen

since: 2.1.0 bbPress (r3653)

forum_parent()   X-Ref
Make Forum Parent a hidden field instead of a selectable one.

since: 2.1.0 bbPress (r3746)

topic_parent()   X-Ref
Output a dropdown for picking which group forum this topic is for.

since: 2.1.0 bbPress (r3746)

form_permissions( $retval = false )   X-Ref
Permissions to view the 'New Topic'/'Reply To' form in a BuddyPress group.

return: bool
since: 2.3.0 bbPress (r4608)
param: bool $retval Are we allowed to view the reply form?

group_settings_hidden_field()   X-Ref
Add a hidden input field on the group settings page if the group forum is
enabled.

Due to the way BuddyPress' group admin settings page saves its settings,
we need to let BP know that bbPress added a forum.

since: 2.4.0 bbPress (r5026)

maybe_map_permalink_to_group( $post_id = 0, $url = false )   X-Ref
Maybe map a bbPress forum/topic/reply permalink to the corresponding group

return: Bail early if not a group forum post
return: string
since: 2.2.0 bbPress (r4266)
param: int $post_id

map_forum_permalink_to_group( $url, $forum_id )   X-Ref
Map a forum permalink to its corresponding group

return: string
since: 2.1.0 bbPress (r3802)
param: string $url
param: int $forum_id

map_topic_permalink_to_group( $url, $topic_id )   X-Ref
Map a topic permalink to its group forum

return: string
since: 2.1.0 bbPress (r3802)
param: string $url
param: int $topic_id

map_reply_permalink_to_group( $url, $reply_id )   X-Ref
Map a reply permalink to its group forum

return: string
since: 2.1.0 bbPress (r3802)
param: string $url
param: int $reply_id

map_reply_edit_url_to_group( $url, $reply_id )   X-Ref
Map a reply edit link to its group forum

return: string
since: 2.2.0 bbPress (r4266)
param: string $url
param: int $reply_id

post_link( $url, $post )   X-Ref
Map a post link to its group forum

return: string
since: 2.2.0 bbPress (r4266)
param: string $url
param: obj $post
param: boolean $leavename

page_link( $url, $post_id )   X-Ref
Map a page link to its group forum

return: string
since: 2.2.0 bbPress (r4266)
param: string $url
param: int $post_id
param: $sample

post_type_link( $url, $post )   X-Ref
Map a custom post type link to its group forum

return: string
since: 2.2.0 bbPress (r4266)
param: string $url
param: obj $post
param: $leavename
param: $sample

topic_pagination( $args )   X-Ref
Fix pagination of topics on forum view

return: array
since: 2.2.0 bbPress (r4266)
param: array $args

replies_pagination( $args )   X-Ref
Fix pagination of replies on topic view

return: array
since: 2.2.0 bbPress (r4266)
param: array $args

redirect_canonical()   X-Ref
Ensure that forum content associated with a BuddyPress group can only be
viewed via the group URL.

since: 2.1.0 bbPress (r3802)

map_activity_to_group( $args = array()   X-Ref
Map a forum post to its corresponding group in the group activity stream.

return: array
since: 2.2.0 bbPress (r4396)
param: array $args Arguments from BBP_BuddyPress_Activity::record_activity()



Generated: Fri Apr 19 01:01:01 2024 Cross-referenced by PHPXref 0.7.1