PluginProbe
bbPress / 2.6.17
bbPress v2.6.17
2.6.17 trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 2.2 2.2.1 All 72 releases
← All changes | includes/core/capabilities.php +19 -19 trunk2.6.17 View file →
@@ -1,8 +1,8 @@
1 1 <?php
2 2
3 3 /**
4 - * bbPress Capabilities.
4 + * bbPress Capabilites
5 5 *
6 6 * The functions in this file are used primarily as convenient wrappers for
7 7 * capability output in user profiles. This includes mapping capabilities and
8 8 * groups to human readable strings,
@@ -20,13 +20,13 @@
20 20 * Returns an array of capabilities based on the role that is being requested.
21 21 *
22 22 * @since 2.0.0 bbPress (r2994)
23 23 *
24 - * @todo Map all of these and deprecate.
24 + * @todo Map all of these and deprecate
25 25 *
26 - * @param string $role Optional. Defaults to The role to load caps for.
26 + * @param string $role Optional. Defaults to The role to load caps for
27 27 *
28 - * @return array Capabilities for $role.
28 + * @return array Capabilities for $role
29 29 */
30 30 function bbp_get_caps_for_role( $role = '' ) {
31 31
32 32 // Which role are we looking for?
@@ -244,9 +244,9 @@
244 244 do_action( 'bbp_remove_caps' );
245 245 }
246 246
247 247 /**
248 - * Get the available roles, minus the dynamic roles that come with bbPress.
248 + * Get the available roles, minus the dynamic roles that come with bbPress
249 249 *
250 250 * @since 2.4.0 bbPress (r5064)
251 251 *
252 252 * @return array
@@ -278,11 +278,11 @@
278 278 * that may already exist in the $wp_roles array.
279 279 *
280 280 * @since 2.2.0 bbPress (r4290)
281 281 *
282 - * @param WP_Roles $wp_roles The array of WP_Role objects that was initialized.
282 + * @param WP_Roles $wp_roles The array of WP_Role objects that was initialized
283 283 *
284 - * @return WP_Roles The main $wp_roles global.
284 + * @return WP_Roles The main $wp_roles global
285 285 */
286 286 function bbp_add_forums_roles( $wp_roles = null ) {
287 287
288 288 // Maybe initialize WP_Roles just-in-time, but
@@ -309,9 +309,9 @@
309 309 return $wp_roles;
310 310 }
311 311
312 312 /**
313 - * Helper function to add filter to option_wp_user_roles.
313 + * Helper function to add filter to option_wp_user_roles
314 314 *
315 315 * @since 2.2.0 bbPress (r4363)
316 316 * @deprecated 2.6.0 bbPress (r6105)
317 317 *
@@ -341,12 +341,12 @@
341 341 *
342 342 * @since 2.2.0 bbPress (r4363)
343 343 * @deprecated 2.6.0 bbPress (r6105)
344 344 *
345 - * @internal Used by bbPress to reinitialize dynamic roles on blog switch.
345 + * @internal Used by bbPress to reinitialize dynamic roles on blog switch
346 346 *
347 347 * @param array $roles
348 - * @return array Combined array of database roles and dynamic bbPress roles.
348 + * @return array Combined array of database roles and dynamic bbPress roles
349 349 */
350 350 function _bbp_reinit_dynamic_roles( $roles = array() ) {
351 351 foreach ( bbp_get_dynamic_roles() as $role_id => $details ) {
352 352 $roles[ $role_id ] = $details;
@@ -387,15 +387,15 @@
387 387 return (array) apply_filters( 'bbp_get_dynamic_roles', $to_array, $roles );
388 388 }
389 389
390 390 /**
391 - * Gets a translated role name from a role ID.
391 + * Gets a translated role name from a role ID
392 392 *
393 393 * @since 2.3.0 bbPress (r4792)
394 394 * @since 2.6.0 bbPress (r6117) Use bbp_translate_user_role()
395 395 *
396 396 * @param string $role_id
397 - * @return string Translated role name.
397 + * @return string Translated role name
398 398 */
399 399 function bbp_get_dynamic_role_name( $role_id = '' ) {
400 400 $roles = bbp_get_dynamic_roles();
401 401 $role = isset( $roles[ $role_id ] )
@@ -406,9 +406,9 @@
406 406 return apply_filters( 'bbp_get_dynamic_role_name', $role, $role_id, $roles );
407 407 }
408 408
409 409 /**
410 - * Removes the bbPress roles from the editable roles array.
410 + * Removes the bbPress roles from the editable roles array
411 411 *
412 412 * This used to use array_diff_assoc() but it randomly broke before 2.2 release.
413 413 * Need to research what happened, and if there's a way to speed this up.
414 414 *
@@ -413,9 +413,9 @@
413 413 * Need to research what happened, and if there's a way to speed this up.
414 414 *
415 415 * @since 2.2.0 bbPress (r4303)
416 416 *
417 - * @param array $all_roles All registered roles.
417 + * @param array $all_roles All registered roles
418 418 * @return array
419 419 */
420 420 function bbp_filter_blog_editable_roles( $all_roles = array() ) {
421 421
@@ -435,9 +435,9 @@
435 435 return $all_roles;
436 436 }
437 437
438 438 /**
439 - * The keymaster role for bbPress users.
439 + * The keymaster role for bbPress users
440 440 *
441 441 * @since 2.2.0 bbPress (r4284)
442 442 *
443 443 * @return string
@@ -448,9 +448,9 @@
448 448 return apply_filters( 'bbp_get_keymaster_role', 'bbp_keymaster' );
449 449 }
450 450
451 451 /**
452 - * The moderator role for bbPress users.
452 + * The moderator role for bbPress users
453 453 *
454 454 * @since 2.0.0 bbPress (r3410)
455 455 *
456 456 * @return string
@@ -461,9 +461,9 @@
461 461 return apply_filters( 'bbp_get_moderator_role', 'bbp_moderator' );
462 462 }
463 463
464 464 /**
465 - * The participant role for registered user that can participate in forums.
465 + * The participant role for registered user that can participate in forums
466 466 *
467 467 * @since 2.0.0 bbPress (r3410)
468 468 *
469 469 * @return string
@@ -474,9 +474,9 @@
474 474 return apply_filters( 'bbp_get_participant_role', 'bbp_participant' );
475 475 }
476 476
477 477 /**
478 - * The spectator role is for registered users without any capabilities.
478 + * The spectator role is for registered users without any capabilities
479 479 *
480 480 * @since 2.1.0 bbPress (r3860)
481 481 *
482 482 * @return string
@@ -487,9 +487,9 @@
487 487 return apply_filters( 'bbp_get_spectator_role', 'bbp_spectator' );
488 488 }
489 489
490 490 /**
491 - * The blocked role is for registered users that cannot spectate or participate.
491 + * The blocked role is for registered users that cannot spectate or participate
492 492 *
493 493 * @since 2.2.0 bbPress (r4284)
494 494 *
495 495 * @return string