300 | | // An array of strings looped over to create component setup markup |
301 | | $optional_components = array( |
302 | | 'xprofile' => array( |
303 | | 'title' => __( "Extended Profiles", 'buddypress' ), |
304 | | 'description' => __( "Fully editable profile fields allow you to define the fields users can fill in to describe themselves. Tailor profile fields to suit your audience.", 'buddypress' ) |
305 | | ), |
306 | | 'friends' => array( |
307 | | 'title' => __( "Friend Connections", 'buddypress' ), |
308 | | 'description' => __( "Let your users make connections so they can track the activity of others, or filter on only those users they care about the most.", 'buddypress' ) |
309 | | ), |
310 | | 'messages' => array( |
311 | | 'title' => __( "Private Messaging", 'buddypress' ), |
312 | | 'description' => __( "Private messaging will allow your users to talk to each other directly, and in private. Not just limited to one on one discussions, your users can send messages to multiple recipients.", 'buddypress' ) |
313 | | ), |
314 | | 'activity' => array( |
315 | | 'title' => __( "Activity Streams", 'buddypress' ), |
316 | | 'description' => __( "Global, personal and group activity streams with threaded commenting, direct posting, favoriting and @mentions. All with full RSS feed and email notification support.", 'buddypress' ) |
317 | | ), |
318 | | 'groups' => array( |
319 | | 'title' => __( "Extensible Groups", 'buddypress' ), |
320 | | 'description' => __( "Powerful public, private or hidden groups allow your users to break the discussion down into specific topics with a separate activity stream and member listing.", 'buddypress' ) |
321 | | ), |
322 | | 'forums' => array( |
323 | | 'title' => __( "Discussion Forums", 'buddypress' ), |
324 | | 'description' => __( "Full powered discussion forums built directly into groups allow for more conventional in-depth conversations. NOTE: This will require an extra (but easy) setup step.", 'buddypress' ) |
325 | | ) |
326 | | ); |
| 303 | // Get the array of strings looped over to create component setup markup |
| 304 | $optional_components = bp_core_admin_components_available(); |
| 344 | * Returns the available component options in the requested format |
| 345 | * |
| 346 | * @package BuddyPress Core |
| 347 | * @since 1.3 |
| 348 | * |
| 349 | * @param string $format The requested format; 'keys' will return just the keys available, anything else will return a multidimensional array with keys, title, and description. |
| 350 | * @return array |
| 351 | */ |
| 352 | function bp_core_admin_components_available( $format = '' ){ |
| 353 | $format = 'keys' == $format ? 'keys' : 'full'; |
| 354 | if( $format == 'full' ){ |
| 355 | |
| 356 | $optional_components = array( |
| 357 | 'xprofile' => array( |
| 358 | 'title' => __( "Extended Profiles", 'buddypress' ), |
| 359 | 'description' => __( "Fully editable profile fields allow you to define the fields users can fill in to describe themselves. Tailor profile fields to suit your audience.", 'buddypress' ) |
| 360 | ), |
| 361 | 'friends' => array( |
| 362 | 'title' => __( "Friend Connections", 'buddypress' ), |
| 363 | 'description' => __( "Let your users make connections so they can track the activity of others, or filter on only those users they care about the most.", 'buddypress' ) |
| 364 | ), |
| 365 | 'messages' => array( |
| 366 | 'title' => __( "Private Messaging", 'buddypress' ), |
| 367 | 'description' => __( "Private messaging will allow your users to talk to each other directly, and in private. Not just limited to one on one discussions, your users can send messages to multiple recipients.", 'buddypress' ) |
| 368 | ), |
| 369 | 'activity' => array( |
| 370 | 'title' => __( "Activity Streams", 'buddypress' ), |
| 371 | 'description' => __( "Global, personal and group activity streams with threaded commenting, direct posting, favoriting and @mentions. All with full RSS feed and email notification support.", 'buddypress' ) |
| 372 | ), |
| 373 | 'groups' => array( |
| 374 | 'title' => __( "Extensible Groups", 'buddypress' ), |
| 375 | 'description' => __( "Powerful public, private or hidden groups allow your users to break the discussion down into specific topics with a separate activity stream and member listing.", 'buddypress' ) |
| 376 | ), |
| 377 | 'forums' => array( |
| 378 | 'title' => __( "Discussion Forums", 'buddypress' ), |
| 379 | 'description' => __( "Full powered discussion forums built directly into groups allow for more conventional in-depth conversations. NOTE: This will require an extra (but easy) setup step.", 'buddypress' ) |
| 380 | ) |
| 381 | ); |
| 382 | |
| 383 | if ( is_multisite() ) { |
| 384 | $optional_components['blogs'] = array( |
| 385 | 'title' => __( "Blog Tracking", 'buddypress' ), |
| 386 | 'description' => __( "Track new blogs, new posts and new comments across your entire blog network.", 'buddypress' ) |
| 387 | ); |
| 388 | } |
| 389 | |
| 390 | } else { |
| 391 | |
| 392 | $optional_components = array( |
| 393 | 'xprofile', |
| 394 | 'friends', |
| 395 | 'messages', |
| 396 | 'activity', |
| 397 | 'groups', |
| 398 | 'forums' |
| 399 | ); |
| 400 | |
| 401 | if ( is_multisite() ) { |
| 402 | $optional_components[] = 'blogs'; |
| 403 | } |
| 404 | |
| 405 | } |
| 406 | |
| 407 | return apply_filters( 'bp_core_admin_components_available', $optional_components, $format ); |
| 408 | |
| 409 | } |
| 410 | |
| 411 | /** |