<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][9048] trunk/src/bp-groups/bp-groups-template.php: Some improved documentation in bp-groups-template.php</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/9048">9048</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/9048","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>boonebgorges</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2014-09-27 01:22:43 +0000 (Sat, 27 Sep 2014)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Some improved documentation in bp-groups-template.php
See <a href="http://buddypress.trac.wordpress.org/ticket/5022">#5022</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpgroupsbpgroupstemplatephp">trunk/src/bp-groups/bp-groups-template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpgroupsbpgroupstemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-groups/bp-groups-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/bp-groups-template.php 2014-09-27 00:49:45 UTC (rev 9047)
+++ trunk/src/bp-groups/bp-groups-template.php 2014-09-27 01:22:43 UTC (rev 9048)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1644,9 +1644,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_get_group_member_count', $count_string );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Output the URL of the Forum page of the current group in the loop.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_forum_permalink() {
</span><span class="cx" style="display: block; padding: 0 10px"> echo bp_get_group_forum_permalink();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Generate the URL of the Forum page of a group.
+ *
+ * @param object $group Optional. Group object. Default: current group in loop.
+ * @return string
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_get_group_forum_permalink( $group = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1656,9 +1665,25 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_get_group_forum_permalink', bp_get_group_permalink( $group ) . 'forum' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Output the topic count for a group forum.
+ *
+ * @param array $args See {@link bp_get_group_forum_topic_count()}.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_forum_topic_count( $args = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo bp_get_group_forum_topic_count( $args );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Generate the topic count string for a group forum.
+ *
+ * @param array $args {
+ * Array of arguments.
+ * @type bool $showtext Optional. If true, result will be formatted
+ * as "x topics". If false, just a number will be returned.
+ * Default: false.
+ * }
+ * @return string|int
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_get_group_forum_topic_count( $args = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1690,9 +1715,25 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_get_group_forum_topic_count', $total_topics, (bool)$showtext );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Output the post count for a group forum.
+ *
+ * @param array $args See {@link bp_get_group_forum_post_count()}.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_forum_post_count( $args = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo bp_get_group_forum_post_count( $args );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Generate the post count string for a group forum.
+ *
+ * @param array $args {
+ * Array of arguments.
+ * @type bool $showtext Optional. If true, result will be formatted
+ * as "x posts". If false, just a number will be returned.
+ * Default: false.
+ * }
+ * @return string|int
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_get_group_forum_post_count( $args = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1724,6 +1765,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_get_group_forum_post_count', $total_posts, (bool)$showtext );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Determine whether forums are enabled for a group.
+ *
+ * @param object $group Optional. Group object. Default: current group in loop.
+ * @return bool
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_is_forum_enabled( $group = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1736,6 +1783,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Output the 'checked' attribute for the group forums settings UI.
+ *
+ * @param object $group Optional. Group object. Default: current group in loop.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_show_forum_setting( $group = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1746,6 +1798,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> echo ' checked="checked"';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Output the 'checked' attribute for a given status in the settings UI.
+ *
+ * @param string $setting Group status. 'public', 'private', 'hidden'.
+ * @param object $group Optional. Group object. Default: current group in loop.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_show_status_setting( $setting, $group = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1757,12 +1815,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Get the 'checked' value, if needed, for a given invite_status on the group create/admin screens
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Output the 'checked' value, if needed, for a given invite_status on the group create/admin screens
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since BuddyPress (1.5.0)
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $setting The setting you want to check against ('members', 'mods', or 'admins')
- * @param BP_Groups_Group $group (optional) The group whose status you want to check
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $setting The setting you want to check against ('members',
+ * 'mods', or 'admins').
+ * @param object $group Optional. Group object. Default: current group in loop.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_group_show_invite_status_setting( $setting, $group = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $group_id = isset( $group->id ) ? $group->id : false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1774,19 +1833,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Get the invite status of a group
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Get the invite status of a group.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * 'invite_status' became part of BuddyPress in BP 1.5. In order to provide backward compatibility,
- * groups without a status set will default to 'members', ie all members in a group can send
- * invitations. Filter 'bp_group_invite_status_fallback' to change this fallback behavior.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * 'invite_status' became part of BuddyPress in BP 1.5. In order to provide
+ * backward compatibility with earlier installations, groups without a status
+ * set will default to 'members', ie all members in a group can send
+ * invitations. Filter 'bp_group_invite_status_fallback' to change this
+ * fallback behavior.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * This function can be used either in or out of the loop.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since BuddyPress (1.5.0)
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $group_id (optional) The id of the group whose status you want to check
- * @return mixed Returns false when no group can be found. Otherwise returns the group invite
- * status, from among 'members', 'mods', and 'admins'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $group_id Optional. The ID of the group whose status you want to
+ * check. Default: the displayed group, or the current group in the loop.
+ * @return bool|string Returns false when no group can be found. Otherwise
+ * returns the group invite status, from among 'members', 'mods', and
+ * 'admins'.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_group_get_invite_status( $group_id = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $bp, $groups_template;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1818,7 +1881,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since BuddyPress (1.5.0)
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int $group_id (optional) The id of the group whose status you want to check
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int $group_id Optional. The ID of the group whose status you want to
+ * check. Default: the ID of the current group.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return bool $can_send_invites
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_groups_user_can_send_invites( $group_id = false ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1944,6 +2008,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Generate the HTML for a list of group moderators.
+ *
+ * No longer used.
+ *
+ * @todo Deprecate.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_mod_memberlist( $admin_list = false, $group = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2006,6 +2077,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Determine whether a group has moderators.
+ *
+ * @param object $group Optional. Group object. Default: current group in loop.
+ * @return array Info about group admins (user_id + date_modified).
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_has_moderators( $group = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2015,9 +2092,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_group_has_moderators', groups_get_group_mods( $group->id ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Output a URL for promoting a user to moderator.
+ *
+ * @param array $args See {@link bp_get_group_member_promote_mod_link()}.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_member_promote_mod_link( $args = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo bp_get_group_member_promote_mod_link( $args );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Generate a URL for promoting a user to moderator.
+ *
+ * @param array $args {
+ * @type int $user_id ID of the member to promote. Default:
+ * current member in a group member loop.
+ * @type object $group Group object. Default: current group.
+ * }
+ * @return string
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_get_group_member_promote_mod_link( $args = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $members_template, $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2032,9 +2124,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_get_group_member_promote_mod_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/promote/mod/' . $user_id, 'groups_promote_member' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Output a URL for promoting a user to admin.
+ *
+ * @param array $args See {@link bp_get_group_member_promote_admin_link()}.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_member_promote_admin_link( $args = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> echo bp_get_group_member_promote_admin_link( $args );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Generate a URL for promoting a user to admin.
+ *
+ * @param array $args {
+ * @type int $user_id ID of the member to promote. Default:
+ * current member in a group member loop.
+ * @type object $group Group object. Default: current group.
+ * }
+ * @return string
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_get_group_member_promote_admin_link( $args = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $members_template, $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2049,6 +2156,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_get_group_member_promote_admin_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/promote/admin/' . $user_id, 'groups_promote_member' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Output a URL for demoting a user to member.
+ *
+ * @param int $user_id ID of the member to demote. Default: current member in
+ * a member loop.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_member_demote_link( $user_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $members_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2057,6 +2170,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> echo bp_get_group_member_demote_link( $user_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Generate a URL for demoting a user to member.
+ *
+ * @param int $user_id ID of the member to demote. Default: current
+ * member in a member loop.
+ * @param object $group Optional. Group object. Default: current group.
+ * @return string
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_get_group_member_demote_link( $user_id = 0, $group = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $members_template, $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2069,6 +2190,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_get_group_member_demote_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/demote/' . $user_id, 'groups_demote_member' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Output a URL for banning a member from a group.
+ *
+ * @param int $user_id ID of the member to ban. Default: current member in
+ * a member loop.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_member_ban_link( $user_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $members_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2077,6 +2204,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> echo bp_get_group_member_ban_link( $user_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Generate a URL for banning a member from a group.
+ *
+ * @param int $user_id ID of the member to ban. Default: current
+ * member in a member loop.
+ * @param object $group Optional. Group object. Default: current group.
+ * @return string
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_get_group_member_ban_link( $user_id = 0, $group = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2086,6 +2221,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_get_group_member_ban_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/ban/' . $user_id, 'groups_ban_member' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Output a URL for unbanning a member from a group.
+ *
+ * @param int $user_id ID of the member to unban. Default: current member in
+ * a member loop.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_member_unban_link( $user_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $members_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2094,6 +2235,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> echo bp_get_group_member_unban_link( $user_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Generate a URL for unbanning a member from a group.
+ *
+ * @param int $user_id ID of the member to unban. Default: current
+ * member in a member loop.
+ * @param object $group Optional. Group object. Default: current group.
+ * @return string
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_get_group_member_unban_link( $user_id = 0, $group = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $members_template, $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2106,7 +2255,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_get_group_member_unban_link', wp_nonce_url( bp_get_group_permalink( $group ) . 'admin/manage-members/unban/' . $user_id, 'groups_unban_member' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/**
+ * Output a URL for removing a member from a group.
+ *
+ * @param int $user_id ID of the member to remove. Default: current member in
+ * a member loop.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_group_member_remove_link( $user_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $members_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2115,6 +2269,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> echo bp_get_group_member_remove_link( $user_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Generate a URL for removing a member from a group.
+ *
+ * @param int $user_id ID of the member to remove. Default: current
+ * member in a member loop.
+ * @param object $group Optional. Group object. Default: current group.
+ * @return string
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> function bp_get_group_member_remove_link( $user_id = 0, $group = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $groups_template;
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre>
</div>
</div>
</body>
</html>