Changeset 9026
- Timestamp:
- 09/17/2014 12:39:27 AM (10 years ago)
- Location:
- trunk/src/bp-groups
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-actions.php
r9023 r9026 317 317 add_action( 'bp_actions', 'groups_action_create_group' ); 318 318 319 /** 320 * Catch and process "Join Group" button clicks. 321 */ 319 322 function groups_action_join_group() { 320 323 global $bp; … … 402 405 /** 403 406 * Sort the group creation steps. 407 * 408 * @return bool|null False on failure. 404 409 */ 405 410 function groups_action_sort_creation_steps() { … … 444 449 * 445 450 * @since BuddyPress (1.2.0) 451 * 452 * @return bool|null False on failure. 446 453 */ 447 454 function groups_action_group_feed() { -
trunk/src/bp-groups/bp-groups-activity.php
r8832 r9026 16 16 /** 17 17 * Register activity actions for the Groups component. 18 * 19 * @return bool|null False on failure. 18 20 */ 19 21 function groups_register_activity_actions() { … … 240 242 * @param int $group_id Optional. The ID of the group whose last_activity is 241 243 * being updated. Default: the current group's ID. 244 * @return bool|null False on failure. 242 245 */ 243 246 function groups_update_last_activity( $group_id = 0 ) { … … 262 265 * 263 266 * @since BuddyPress (1.9.0) 264 * @param int $user_id 265 * @param int $group_id 267 * 268 * @param int $user_id ID of the user joining the group. 269 * @param int $group_id ID of the group. 270 * @return bool|null False on failure. 266 271 */ 267 272 function bp_groups_membership_accepted_add_activity( $user_id, $group_id ) { … … 286 291 287 292 /** 288 * Delete all group activity from activity streams293 * Delete all activity items related to a specific group. 289 294 * 290 295 * @since BuddyPress (1.9.0) 296 * 297 * @param int $group_id ID of the group. 291 298 */ 292 299 function bp_groups_delete_group_delete_all_activity( $group_id ) { … … 301 308 302 309 /** 303 * Delete group member activity if they leave or are removed within 5 minutes of 304 * membership modification. 310 * Delete group member activity if they leave or are removed within 5 minutes of membership modification. 305 311 * 306 312 * If the user joined this group less than five minutes ago, remove the … … 309 315 * 310 316 * @since BuddyPress (1.9.0) 317 * 318 * @param int $group_id ID of the group. 319 * @param int $user_id ID of the user leaving the group. 311 320 */ 312 321 function bp_groups_leave_group_delete_recent_activity( $group_id, $user_id ) { -
trunk/src/bp-groups/bp-groups-admin.php
r8958 r9026 69 69 * @since BuddyPress (1.7.0) 70 70 * 71 * @global BP_Groups_List_Table $bp_groups_list_table Groups screen list table 71 * @global BP_Groups_List_Table $bp_groups_list_table Groups screen list table. 72 72 */ 73 73 function bp_groups_admin_load() { … … 1039 1039 * 1040 1040 * @since BuddyPress (1.7.0) 1041 *1042 1041 * @access public 1043 1042 * @var string … … 1049 1048 * 1050 1049 * @since BuddyPress (1.7.0) 1051 *1052 1050 * @access public 1053 1051 * @var int -
trunk/src/bp-groups/bp-groups-adminbar.php
r8737 r9026 19 19 * 20 20 * @todo Add dynamic menu items for group extensions. 21 * 22 * @return bool|null False if not on a group page, or if user does not have 23 * access to group admin options. 21 24 */ 22 25 function bp_groups_group_admin_menu() { -
trunk/src/bp-groups/bp-groups-classes.php
r8950 r9026 159 159 * @param int $id Optional. If the ID of an existing group is provided, 160 160 * the object will be pre-populated with info about that group. 161 * @param array $args { 162 * Array of optional arguments. 163 * @type bool $populate_extras Whether to fetch "extra" data about 164 * the group (group admins/mods, access for the current user). 165 * Default: false. 166 * } 161 167 */ 162 168 public function __construct( $id = null, $args = array() ) { … … 1492 1498 * 1493 1499 * @since BuddyPress (1.8.1) 1500 * @access protected 1494 1501 * @var null|array Null if not yet defined, otherwise an array of ints. 1495 1502 */ … … 1738 1745 * @since BuddyPress (1.8.0) 1739 1746 * 1740 * @param object $query BP_User_Query object. Because we're filtering 1741 * the current object, we use $this inside of the method instead 1747 * @param BP_User_Query $query BP_User_Query object. Because we're 1748 * filtering the current object, we use $this inside of the 1749 * method instead. 1742 1750 * @param string $user_ids_sql Sanitized, comma-separated string of 1743 * the user ids returned by the main query1751 * the user ids returned by the main query. 1744 1752 */ 1745 1753 public function populate_group_member_extras( $query, $user_ids_sql ) { … … 1773 1781 * Sort user IDs by how recently they have generated activity within a given group. 1774 1782 * 1775 * @since 1783 * @since BuddyPress (2.1.0) 1776 1784 * 1777 1785 * @param BP_User_Query $query BP_User_Query object. … … 1815 1823 1816 1824 /** 1817 * BuddyPress Group Membership object s.1825 * BuddyPress Group Membership object. 1818 1826 */ 1819 1827 class BP_Groups_Member { … … 2841 2849 * 2842 2850 * @since BuddyPress (1.8.0) 2851 * @access public 2843 2852 * @var array 2844 2853 */ … … 2849 2858 * 2850 2859 * @since BuddyPress (1.8.0) 2860 * @access public 2851 2861 * @var string 2852 2862 */ … … 2857 2867 * 2858 2868 * @since BuddyPress (1.8.0) 2869 * @access public 2859 2870 * @var ReflectionClass 2860 2871 */ … … 2865 2876 * 2866 2877 * @since BuddyPress (1.8.0) 2878 * @access public 2867 2879 * @var array 2868 2880 */ … … 2873 2885 * 2874 2886 * @since BuddyPress (2.1.0) 2887 * @access public 2875 2888 * @var array 2876 2889 */ … … 2881 2894 * 2882 2895 * @since BuddyPress (1.8.0) 2896 * @access public 2883 2897 * @var int 2884 2898 */ … … 2888 2902 * The slug of the current extension. 2889 2903 * 2904 * @access public 2890 2905 * @var string 2891 2906 */ … … 2895 2910 * The translatable name of the current extension. 2896 2911 * 2912 * @access public 2897 2913 * @var string 2898 2914 */ … … 2902 2918 * The visibility of the extension tab. 'public' or 'private'. 2903 2919 * 2920 * @access public 2904 2921 * @var string 2905 2922 */ … … 2909 2926 * The numeric position of the main nav item. 2910 2927 * 2928 * @access public 2911 2929 * @var int 2912 2930 */ … … 2916 2934 * Whether to show the nav item. 2917 2935 * 2936 * @access public 2918 2937 * @var bool 2919 2938 */ … … 2924 2943 * 2925 2944 * @since BuddyPress (2.1.0) 2945 * @access public 2926 2946 * @var bool 2927 2947 */ … … 2932 2952 * 2933 2953 * @since BuddyPress (2.1.0) 2954 * @access public 2934 2955 * @var bool 2935 2956 */ … … 2939 2960 * The text of the nav item. Defaults to self::name. 2940 2961 * 2962 * @access public 2941 2963 * @var string 2942 2964 */ … … 2948 2970 * Default: 'groups_custom_group_boxes'. 2949 2971 * 2972 * @access public 2950 2973 * @var string 2951 2974 */ … … 2957 2980 * Default: 'groups/single/plugins'. 2958 2981 * 2982 * @access public 2959 2983 * @var string 2960 2984 */ … … 2967 2991 * 2968 2992 * @since BuddyPress (1.8.0) 2993 * @access protected 2969 2994 * @var bool 2970 2995 */ … … 2975 3000 * 2976 3001 * @since BuddyPress (1.8.0) 3002 * @access protected 2977 3003 * @var array 2978 3004 */ … … 2986 3012 * 2987 3013 * @since BuddyPress (1.8.0) 3014 * @access protected 2988 3015 * @var array 2989 3016 */ … … 2994 3021 * 2995 3022 * @since BuddyPress (2.1.0) 3023 * @access protected 2996 3024 * @var string 2997 3025 */ … … 3002 3030 * 3003 3031 * @since BuddyPress (1.8.0) 3032 * @access protected 3004 3033 * @var array 3005 3034 */ … … 3191 3220 * 3192 3221 * @since BuddyPress (1.8.0) 3222 * 3223 * @return int 3193 3224 */ 3194 3225 public static function get_group_id() { … … 3222 3253 * 3223 3254 * @since BuddyPress (1.8.0) 3255 * 3256 * @return array 3224 3257 */ 3225 3258 protected function get_default_screens() { … … 3859 3892 * @since BuddyPress (1.8.0) 3860 3893 * 3861 * @uses wp_nonce_field()3862 *3863 3894 * @param string $context Screen context. 'create', 'edit', or 'admin'. 3864 3895 */ … … 3871 3902 * 3872 3903 * @since BuddyPress (1.8.0) 3873 *3874 * @uses check_admin_referer()3875 3904 * 3876 3905 * @param string $context Screen context. 'create', 'edit', or 'admin'. … … 3890 3919 * 3891 3920 * @param string $context Screen context. 'create', 'edit', or 'admin'. 3892 *3893 3921 * @return bool True if the screen is enabled, otherwise false. 3894 3922 */ … … 4361 4389 * 4362 4390 * @since BuddyPress (2.1.0) 4391 * @access protected 4363 4392 * @var array $args { 4364 4393 * @type int $group_id Positive integers will restrict the search to members in that group. -
trunk/src/bp-groups/bp-groups-filters.php
r8458 r9026 111 111 } 112 112 113 /** Group forums **************************************************************/114 115 /** 116 * Only filter the forum SQL on group pages or on the forums directory113 /** Legacy group forums (bbPress 1.x) *****************************************/ 114 115 /** 116 * Filter bbPress query SQL when on group pages or on forums directory. 117 117 */ 118 118 function groups_add_forum_privacy_sql() { … … 123 123 add_filter( 'bbpress_init', 'groups_add_forum_privacy_sql' ); 124 124 125 /** 126 * Add fields to bbPress query for group-specific data. 127 * 128 * @param string $sql 129 * @return string 130 */ 125 131 function groups_add_forum_fields_sql( $sql = '' ) { 126 132 $sql = 't.*, g.id as object_id, g.name as object_name, g.slug as object_slug'; … … 128 134 } 129 135 136 /** 137 * Add JOINed tables to bbPress query for group-specific data. 138 * 139 * @param string $sql 140 * @return string 141 */ 130 142 function groups_add_forum_tables_sql( $sql = '' ) { 131 143 global $bp; … … 136 148 } 137 149 150 /** 151 * Add WHERE clauses to bbPress query for group-specific data and access protection. 152 * 153 * @param string $sql 154 * @return string 155 */ 138 156 function groups_add_forum_where_sql( $sql = '' ) { 139 157 global $bp; … … 179 197 } 180 198 199 /** 200 * Modify bbPress caps for bp-forums. 201 * 202 * @param bool $value 203 * @param string $cap 204 * @param array $args 205 * @return bool 206 */ 181 207 function groups_filter_bbpress_caps( $value, $cap, $args ) { 182 208 global $bp; … … 196 222 197 223 /** 198 * Amends the forum directory's "last active" bbPress SQL query to stop it fetching 199 * information we aren't going to use. This speeds up the query. 224 * Amends the forum directory's "last active" bbPress SQL query to stop it fetching information we aren't going to use. 225 * 226 * This speeds up the query. 227 * 228 * @since BuddyPress (1.5.0) 200 229 * 201 230 * @see BB_Query::_filter_sql() 202 * @since BuddyPress (1.5)203 231 */ 204 232 function groups_filter_forums_root_page_sql( $sql ) { -
trunk/src/bp-groups/bp-groups-forums.php
r8460 r9026 23 23 * Uses the bundled version of bbPress packaged with BuddyPress. 24 24 * 25 * @ param int $group_id The group ID that the new forum should be attached to26 * @param string $group_name The group name27 * @param string $group_desc The group description28 * 29 * @ since BuddyPress (1.0)25 * @since BuddyPress (1.0.0) 26 * 27 * @param int $group_id The group ID that the new forum should be attached to. 28 * @param string $group_name The group name. 29 * @param string $group_desc The group description. 30 30 */ 31 31 function groups_new_group_forum( $group_id = 0, $group_name = '', $group_desc = '' ) { … … 54 54 55 55 /** 56 * Updates group forum metadata (title, description, slug) when the group's details are edited 57 * 58 * @package BuddyPress 59 * @subpackage Groups 60 * 61 * @param int $group_id Group id, passed from groups_details_updated 62 * 63 * @since BuddyPress (1.1) 56 * Update group forum metadata (title, description, slug) when the group's details are edited. 57 * 58 * @since BuddyPress (1.1.0) 59 * 60 * @param int $group_id Group id, passed from groups_details_updated. 64 61 */ 65 62 function groups_update_group_forum( $group_id ) { … … 88 85 89 86 /** 90 * Creates a new group forum post. 91 * 92 * Uses the bundled version of bbPress packaged with BuddyPress. 93 * 94 * @param string $post_text The text for the forum post 95 * @param int $topic_id The topic ID used so we can identify where the new forum post should reside 96 * @param mixed $page The page number where the new forum post should reside. Defaults to boolean false. 87 * Create a new group forum post. 88 * 89 * Uses the bundled version of bbPress packaged with BuddyPress. 90 * 91 * @since BuddyPress (1.0.0) 92 * 93 * @param string $post_text The text for the forum post. 94 * @param int $topic_id The topic ID used so we can identify where the new 95 * forum post should reside. 96 * @param mixed $page The page number where the new forum post should reside. 97 * Default: false. 97 98 * @return mixed The new forum post ID on success. Boolean false on failure. 98 *99 * @since BuddyPress (1.0)100 99 */ 101 100 function groups_new_group_forum_post( $post_text, $topic_id, $page = false ) { … … 140 139 141 140 /** 142 * Creates a new group forum topic. 143 * 144 * Uses the bundled version of bbPress packaged with BuddyPress. 145 * 146 * @param string $topic_title The title for the forum topic 147 * @param string $topic_text The text for the forum topic 148 * @param string $topic_tags A comma-delimited string of topic tags 149 * @param int $forum_id The forum ID this forum topic resides in 141 * Create a new group forum topic. 142 * 143 * Uses the bundled version of bbPress packaged with BuddyPress. 144 * 145 * @since BuddyPress (1.0.0) 146 * 147 * @param string $topic_title The title for the forum topic. 148 * @param string $topic_text The text for the forum topic. 149 * @param string $topic_tags A comma-delimited string of topic tags. 150 * @param int $forum_id The forum ID this forum topic resides in. 150 151 * @return mixed The new topic object on success. Boolean false on failure. 151 *152 * @since BuddyPress (1.0)153 152 */ 154 153 function groups_new_group_forum_topic( $topic_title, $topic_text, $topic_tags, $forum_id ) { … … 191 190 192 191 /** 193 * Updates an existing group forum topic. 194 * 195 * Uses the bundled version of bbPress packaged with BuddyPress. 196 * 197 * @param int $topic_id The topic ID of the existing forum topic 198 * @param string $topic_title The title for the forum topic 199 * @param string $topic_text The text for the forum topic 200 * @param mixed $topic_tags A comma-delimited string of topic tags. Defaults to boolean false. 192 * Update an existing group forum topic. 193 * 194 * Uses the bundled version of bbPress packaged with BuddyPress. 195 * 196 * @since BuddyPress (1.1.0) 197 * 198 * @param int $topic_id The topic ID of the existing forum topic. 199 * @param string $topic_title The title for the forum topic. 200 * @param string $topic_text The text for the forum topic. 201 * @param mixed $topic_tags A comma-delimited string of topic tags. Optional. 201 202 * @return mixed The topic object on success. Boolean false on failure. 202 *203 * @since BuddyPress (1.1)204 203 */ 205 204 function groups_update_group_forum_topic( $topic_id, $topic_title, $topic_text, $topic_tags = false ) { … … 251 250 252 251 /** 253 * Updates an existing group forum post. 254 * 255 * Uses the bundled version of bbPress packaged with BuddyPress. 256 * 257 * @param int $post_id The post ID of the existing forum post 258 * @param string $post_text The text for the forum post 259 * @param int $topic_id The topic ID of the existing forum topic 260 * @param mixed $page The page number where the new forum post should reside. Defaults to boolean false. 252 * Update an existing group forum post. 253 * 254 * Uses the bundled version of bbPress packaged with BuddyPress. 255 * 256 * @since BuddyPress (1.1.0) 257 * 258 * @param int $post_id The post ID of the existing forum post. 259 * @param string $post_text The text for the forum post. 260 * @param int $topic_id The topic ID of the existing forum topic. 261 * @param mixed $page The page number where the new forum post should reside. 262 * Optional. 261 263 * @return mixed The forum post ID on success. Boolean false on failure. 262 *263 * @since BuddyPress (1.1)264 264 */ 265 265 function groups_update_group_forum_post( $post_id, $post_text, $topic_id, $page = false ) { … … 320 320 321 321 /** 322 * Deletes a group forum topic and also any corresponding activity items. 323 * 324 * Uses the bundled version of bbPress packaged with BuddyPress. 325 * 326 * @package BuddyPress 327 * 328 * @uses bp_activity_delete() to delete corresponding activity items 329 * @uses bp_forums_get_topic_posts() to get the child posts 330 * @uses bp_forums_delete_topic() to do the deletion itself 331 * @param int $topic_id The id of the topic to be deleted 332 * @return bool True if the delete routine went through properly 333 * 334 * @since BuddyPress (1.1) 322 * Delete a group forum topic and also any corresponding activity items. 323 * 324 * Uses the bundled version of bbPress packaged with BuddyPress. 325 * 326 * @since BuddyPress (1.1.0) 327 * 328 * @param int $topic_id The ID of the topic to be deleted. 329 * @return bool True if the delete routine went through properly. 335 330 */ 336 331 function groups_delete_group_forum_topic( $topic_id ) { … … 373 368 374 369 /** 375 * Delete sa group forum post and its corresponding activity item.376 * 377 * Uses the bundled version of bbPress packaged with BuddyPress. 378 * 379 * @ package BuddyPress380 * 381 * @param int $post_id The id of the post you want to delete370 * Delete a group forum post and its corresponding activity item. 371 * 372 * Uses the bundled version of bbPress packaged with BuddyPress. 373 * 374 * @since BuddyPress (1.1.0) 375 * 376 * @param int $post_id The ID of the post you want to delete. 382 377 * @param int $topic_id Optional. The topic to which the post belongs. This 383 * value isn't used in the function but is passed along to384 * do_action()hooks.378 * value isn't used in the function but is passed along to do_action() 379 * hooks. 385 380 * @return bool True on success. 386 *387 * @since BuddyPress (1.1)388 381 */ 389 382 function groups_delete_group_forum_post( $post_id, $topic_id = false ) { … … 411 404 412 405 /** 413 * Get a total count of all public topics of a given type, across groups/forums 414 * 415 * @ package BuddyPress416 * @since BuddyPress (1.5)417 * 418 * @param string $type Either 'newest', 'popular', 'unreplied', 'tags'. Defaults to'newest'.419 * @return int The topic count 406 * Get a total count of all public topics of a given type, across groups/forums. 407 * 408 * @since BuddyPress (1.5.0) 409 * 410 * @param string $type Either 'newest', 'popular', 'unreplied', 'tags'. 411 * Default: 'newest'. 412 * @return int The topic count. 420 413 */ 421 414 function groups_total_public_forum_topic_count( $type = 'newest' ) { … … 424 417 425 418 /** 426 * Get a total count of all topics of a given status, across groups/forums 427 * 428 * @package BuddyPress 429 * @since BuddyPress (1.5) 430 * 431 * @param string $status 'public', 'private', 'hidden', 'all' Which group types to count 432 * @return int The topic count 419 * Get a total count of all topics of a given status, across groups/forums. 420 * 421 * @since BuddyPress (1.5.0) 422 * 423 * @param string $status Which groups to count. 'public', 'private', 'hidden', 424 * 'all'. Default: 'public'. 425 * @param string $search_terms Optional. Limit by a search term. 426 * @return int The topic count. 433 427 */ 434 428 function groups_total_forum_topic_count( $status = 'public', $search_terms = false ) {
Note: See TracChangeset
for help on using the changeset viewer.