Changeset 9048
- Timestamp:
- 09/27/2014 01:22:43 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r9047 r9048 1645 1645 } 1646 1646 1647 /** 1648 * Output the URL of the Forum page of the current group in the loop. 1649 */ 1647 1650 function bp_group_forum_permalink() { 1648 1651 echo bp_get_group_forum_permalink(); 1649 1652 } 1653 /** 1654 * Generate the URL of the Forum page of a group. 1655 * 1656 * @param object $group Optional. Group object. Default: current group in loop. 1657 * @return string 1658 */ 1650 1659 function bp_get_group_forum_permalink( $group = false ) { 1651 1660 global $groups_template; … … 1657 1666 } 1658 1667 1668 /** 1669 * Output the topic count for a group forum. 1670 * 1671 * @param array $args See {@link bp_get_group_forum_topic_count()}. 1672 */ 1659 1673 function bp_group_forum_topic_count( $args = '' ) { 1660 1674 echo bp_get_group_forum_topic_count( $args ); 1661 1675 } 1676 /** 1677 * Generate the topic count string for a group forum. 1678 * 1679 * @param array $args { 1680 * Array of arguments. 1681 * @type bool $showtext Optional. If true, result will be formatted 1682 * as "x topics". If false, just a number will be returned. 1683 * Default: false. 1684 * } 1685 * @return string|int 1686 */ 1662 1687 function bp_get_group_forum_topic_count( $args = '' ) { 1663 1688 global $groups_template; … … 1691 1716 } 1692 1717 1718 /** 1719 * Output the post count for a group forum. 1720 * 1721 * @param array $args See {@link bp_get_group_forum_post_count()}. 1722 */ 1693 1723 function bp_group_forum_post_count( $args = '' ) { 1694 1724 echo bp_get_group_forum_post_count( $args ); 1695 1725 } 1726 /** 1727 * Generate the post count string for a group forum. 1728 * 1729 * @param array $args { 1730 * Array of arguments. 1731 * @type bool $showtext Optional. If true, result will be formatted 1732 * as "x posts". If false, just a number will be returned. 1733 * Default: false. 1734 * } 1735 * @return string|int 1736 */ 1696 1737 function bp_get_group_forum_post_count( $args = '' ) { 1697 1738 global $groups_template; … … 1725 1766 } 1726 1767 1768 /** 1769 * Determine whether forums are enabled for a group. 1770 * 1771 * @param object $group Optional. Group object. Default: current group in loop. 1772 * @return bool 1773 */ 1727 1774 function bp_group_is_forum_enabled( $group = false ) { 1728 1775 global $groups_template; … … 1737 1784 } 1738 1785 1786 /** 1787 * Output the 'checked' attribute for the group forums settings UI. 1788 * 1789 * @param object $group Optional. Group object. Default: current group in loop. 1790 */ 1739 1791 function bp_group_show_forum_setting( $group = false ) { 1740 1792 global $groups_template; … … 1747 1799 } 1748 1800 1801 /** 1802 * Output the 'checked' attribute for a given status in the settings UI. 1803 * 1804 * @param string $setting Group status. 'public', 'private', 'hidden'. 1805 * @param object $group Optional. Group object. Default: current group in loop. 1806 */ 1749 1807 function bp_group_show_status_setting( $setting, $group = false ) { 1750 1808 global $groups_template; … … 1758 1816 1759 1817 /** 1760 * Get the 'checked' value, if needed, for a given invite_status on the group create/admin screens1818 * Output the 'checked' value, if needed, for a given invite_status on the group create/admin screens 1761 1819 * 1762 1820 * @since BuddyPress (1.5.0) 1763 1821 * 1764 * @param string $setting The setting you want to check against ('members', 'mods', or 'admins') 1765 * @param BP_Groups_Group $group (optional) The group whose status you want to check 1822 * @param string $setting The setting you want to check against ('members', 1823 * 'mods', or 'admins'). 1824 * @param object $group Optional. Group object. Default: current group in loop. 1766 1825 */ 1767 1826 function bp_group_show_invite_status_setting( $setting, $group = false ) { … … 1775 1834 1776 1835 /** 1777 * Get the invite status of a group 1778 * 1779 * 'invite_status' became part of BuddyPress in BP 1.5. In order to provide backward compatibility, 1780 * groups without a status set will default to 'members', ie all members in a group can send 1781 * invitations. Filter 'bp_group_invite_status_fallback' to change this fallback behavior. 1836 * Get the invite status of a group. 1837 * 1838 * 'invite_status' became part of BuddyPress in BP 1.5. In order to provide 1839 * backward compatibility with earlier installations, groups without a status 1840 * set will default to 'members', ie all members in a group can send 1841 * invitations. Filter 'bp_group_invite_status_fallback' to change this 1842 * fallback behavior. 1782 1843 * 1783 1844 * This function can be used either in or out of the loop. … … 1785 1846 * @since BuddyPress (1.5.0) 1786 1847 * 1787 * @param int $group_id (optional) The id of the group whose status you want to check 1788 * @return mixed Returns false when no group can be found. Otherwise returns the group invite 1789 * status, from among 'members', 'mods', and 'admins' 1848 * @param int $group_id Optional. The ID of the group whose status you want to 1849 * check. Default: the displayed group, or the current group in the loop. 1850 * @return bool|string Returns false when no group can be found. Otherwise 1851 * returns the group invite status, from among 'members', 'mods', and 1852 * 'admins'. 1790 1853 */ 1791 1854 function bp_group_get_invite_status( $group_id = false ) { … … 1819 1882 * @since BuddyPress (1.5.0) 1820 1883 * 1821 * @param int $group_id (optional) The id of the group whose status you want to check 1884 * @param int $group_id Optional. The ID of the group whose status you want to 1885 * check. Default: the ID of the current group. 1822 1886 * @return bool $can_send_invites 1823 1887 */ … … 1945 2009 } 1946 2010 2011 /** 2012 * Generate the HTML for a list of group moderators. 2013 * 2014 * No longer used. 2015 * 2016 * @todo Deprecate. 2017 */ 1947 2018 function bp_group_mod_memberlist( $admin_list = false, $group = false ) { 1948 2019 global $groups_template; … … 2007 2078 } 2008 2079 2080 /** 2081 * Determine whether a group has moderators. 2082 * 2083 * @param object $group Optional. Group object. Default: current group in loop. 2084 * @return array Info about group admins (user_id + date_modified). 2085 */ 2009 2086 function bp_group_has_moderators( $group = false ) { 2010 2087 global $groups_template; … … 2016 2093 } 2017 2094 2095 /** 2096 * Output a URL for promoting a user to moderator. 2097 * 2098 * @param array $args See {@link bp_get_group_member_promote_mod_link()}. 2099 */ 2018 2100 function bp_group_member_promote_mod_link( $args = '' ) { 2019 2101 echo bp_get_group_member_promote_mod_link( $args ); 2020 2102 } 2103 /** 2104 * Generate a URL for promoting a user to moderator. 2105 * 2106 * @param array $args { 2107 * @type int $user_id ID of the member to promote. Default: 2108 * current member in a group member loop. 2109 * @type object $group Group object. Default: current group. 2110 * } 2111 * @return string 2112 */ 2021 2113 function bp_get_group_member_promote_mod_link( $args = '' ) { 2022 2114 global $members_template, $groups_template; … … 2033 2125 } 2034 2126 2127 /** 2128 * Output a URL for promoting a user to admin. 2129 * 2130 * @param array $args See {@link bp_get_group_member_promote_admin_link()}. 2131 */ 2035 2132 function bp_group_member_promote_admin_link( $args = '' ) { 2036 2133 echo bp_get_group_member_promote_admin_link( $args ); 2037 2134 } 2135 /** 2136 * Generate a URL for promoting a user to admin. 2137 * 2138 * @param array $args { 2139 * @type int $user_id ID of the member to promote. Default: 2140 * current member in a group member loop. 2141 * @type object $group Group object. Default: current group. 2142 * } 2143 * @return string 2144 */ 2038 2145 function bp_get_group_member_promote_admin_link( $args = '' ) { 2039 2146 global $members_template, $groups_template; … … 2050 2157 } 2051 2158 2159 /** 2160 * Output a URL for demoting a user to member. 2161 * 2162 * @param int $user_id ID of the member to demote. Default: current member in 2163 * a member loop. 2164 */ 2052 2165 function bp_group_member_demote_link( $user_id = 0 ) { 2053 2166 global $members_template; … … 2058 2171 echo bp_get_group_member_demote_link( $user_id ); 2059 2172 } 2173 /** 2174 * Generate a URL for demoting a user to member. 2175 * 2176 * @param int $user_id ID of the member to demote. Default: current 2177 * member in a member loop. 2178 * @param object $group Optional. Group object. Default: current group. 2179 * @return string 2180 */ 2060 2181 function bp_get_group_member_demote_link( $user_id = 0, $group = false ) { 2061 2182 global $members_template, $groups_template; … … 2070 2191 } 2071 2192 2193 /** 2194 * Output a URL for banning a member from a group. 2195 * 2196 * @param int $user_id ID of the member to ban. Default: current member in 2197 * a member loop. 2198 */ 2072 2199 function bp_group_member_ban_link( $user_id = 0 ) { 2073 2200 global $members_template; … … 2078 2205 echo bp_get_group_member_ban_link( $user_id ); 2079 2206 } 2207 /** 2208 * Generate a URL for banning a member from a group. 2209 * 2210 * @param int $user_id ID of the member to ban. Default: current 2211 * member in a member loop. 2212 * @param object $group Optional. Group object. Default: current group. 2213 * @return string 2214 */ 2080 2215 function bp_get_group_member_ban_link( $user_id = 0, $group = false ) { 2081 2216 global $groups_template; … … 2087 2222 } 2088 2223 2224 /** 2225 * Output a URL for unbanning a member from a group. 2226 * 2227 * @param int $user_id ID of the member to unban. Default: current member in 2228 * a member loop. 2229 */ 2089 2230 function bp_group_member_unban_link( $user_id = 0 ) { 2090 2231 global $members_template; … … 2095 2236 echo bp_get_group_member_unban_link( $user_id ); 2096 2237 } 2238 /** 2239 * Generate a URL for unbanning a member from a group. 2240 * 2241 * @param int $user_id ID of the member to unban. Default: current 2242 * member in a member loop. 2243 * @param object $group Optional. Group object. Default: current group. 2244 * @return string 2245 */ 2097 2246 function bp_get_group_member_unban_link( $user_id = 0, $group = false ) { 2098 2247 global $members_template, $groups_template; … … 2107 2256 } 2108 2257 2109 2258 /** 2259 * Output a URL for removing a member from a group. 2260 * 2261 * @param int $user_id ID of the member to remove. Default: current member in 2262 * a member loop. 2263 */ 2110 2264 function bp_group_member_remove_link( $user_id = 0 ) { 2111 2265 global $members_template; … … 2116 2270 echo bp_get_group_member_remove_link( $user_id ); 2117 2271 } 2272 /** 2273 * Generate a URL for removing a member from a group. 2274 * 2275 * @param int $user_id ID of the member to remove. Default: current 2276 * member in a member loop. 2277 * @param object $group Optional. Group object. Default: current group. 2278 * @return string 2279 */ 2118 2280 function bp_get_group_member_remove_link( $user_id = 0, $group = false ) { 2119 2281 global $groups_template;
Note: See TracChangeset
for help on using the changeset viewer.