Changeset 11763 for trunk/src/bp-core/bp-core-functions.php
- Timestamp:
- 12/08/2017 12:22:09 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r11698 r11763 446 446 } 447 447 448 449 /** 450 * Return the parent forum ID for the Legacy Forums abstraction layer. 451 * 452 * @since 1.5.0 453 * @since 3.0.0 Supported for compatibility with bbPress 2. 454 * 455 * @return int Forum ID. 456 */ 457 function bp_forums_parent_forum_id() { 458 459 /** 460 * Filters the parent forum ID for the bbPress abstraction layer. 461 * 462 * @since 1.5.0 463 * 464 * @param int BP_FORUMS_PARENT_FORUM_ID The Parent forum ID constant. 465 */ 466 return apply_filters( 'bp_forums_parent_forum_id', BP_FORUMS_PARENT_FORUM_ID ); 467 } 468 448 469 /** Directory *****************************************************************/ 449 470 … … 467 488 'notifications', 468 489 ); 469 470 // Only add legacy forums if it is enabled471 // prevents conflicts with bbPress, which also uses the same 'forums' id.472 if ( class_exists( 'BP_Forums_Component' ) ) {473 $components[] = 'forums';474 }475 490 476 491 return $components; … … 1731 1746 1732 1747 /** 1733 * Are oembeds allowed in forum posts?1734 *1735 * @since 1.5.01736 *1737 * @return bool False when forum post embed support is disabled; true when1738 * enabled. Default: true.1739 */1740 function bp_use_embed_in_forum_posts() {1741 1742 /**1743 * Filters whether or not oEmbeds are allowed in forum posts.1744 *1745 * @since 1.5.01746 *1747 * @param bool $value Whether or not oEmbeds are allowed.1748 */1749 return apply_filters( 'bp_use_embed_in_forum_posts', !defined( 'BP_EMBED_DISABLE_FORUM_POSTS' ) || !BP_EMBED_DISABLE_FORUM_POSTS );1750 }1751 1752 /**1753 1748 * Are oembeds allowed in private messages? 1754 1749 * … … 2356 2351 break; 2357 2352 2358 case 'forums':2359 $slug = bp_is_active( 'forums' ) ? bp_get_forums_root_slug() : '';2360 $query_string = '/?fs=';2361 break;2362 2363 2353 case 'groups': 2364 2354 $slug = bp_is_active( 'groups' ) ? bp_get_groups_root_slug() : ''; … … 2464 2454 2465 2455 $retired_components = array( 2466 'forums' => array(2467 'title' => __( 'Group Forums', 'buddypress' ),2468 'description' => sprintf( __( 'BuddyPress Forums are retired. Use %s.', 'buddypress' ), '<a href="https://bbpress.org/">bbPress</a>' )2469 ),2470 2456 ); 2471 2457 … … 2498 2484 'title' => __( 'User Groups', 'buddypress' ), 2499 2485 'description' => __( 'Groups allow your users to organize themselves into specific public, private or hidden sections with separate activity streams and member listings.', 'buddypress' ) 2500 ),2501 'forums' => array(2502 'title' => __( 'Group Forums (Legacy)', 'buddypress' ),2503 'description' => __( 'Group forums allow for focused, bulletin-board style conversations.', 'buddypress' )2504 2486 ), 2505 2487 'blogs' => array(
Note: See TracChangeset
for help on using the changeset viewer.