Changeset 6438 for trunk/src/includes/extend/buddypress/functions.php
- Timestamp:
- 05/27/2017 05:04:31 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/extend/buddypress/functions.php
r6415 r6438 30 30 function bbp_get_component_name() { 31 31 32 // Use existing ID 33 if ( ! empty( bbpress()->extend->buddypress->id ) ) { 34 $retval = bbpress()->extend->buddypress->id; 35 36 // Use default 37 } else { 38 $retval = 'forums'; 39 } 40 32 // Use existing ID or default 33 $retval = ! empty( bbpress()->extend->buddypress->id ) 34 ? bbpress()->extend->buddypress->id 35 : 'forums'; 36 37 // Filter & return 41 38 return apply_filters( 'bbp_get_component_name', $retval ); 42 39 } … … 65 62 if ( ! empty( $user_id ) && is_numeric( $user_id ) ) { 66 63 $bbp_user_id = $user_id; 67 }68 64 69 65 // Currently viewing or editing a user 70 elseif ( ( true === $displayed_user_fallback ) && ! empty( $did ) ) {66 } elseif ( ( true === $displayed_user_fallback ) && ! empty( $did ) ) { 71 67 $bbp_user_id = $did; 72 }73 68 74 69 // Maybe fallback on the current_user ID 75 elseif ( ( true === $current_user_fallback ) && ! empty( $lid ) ) {70 } elseif ( ( true === $current_user_fallback ) && ! empty( $lid ) ) { 76 71 $bbp_user_id = $lid; 77 72 } … … 81 76 82 77 /** 83 * Filter the bbPress is_single_user function with BuddyPress eq ivalent78 * Filter the bbPress is_single_user function with BuddyPress equivalent 84 79 * 85 80 * @since 2.1.0 bbPress (r3552) … … 97 92 98 93 /** 99 * Filter the bbPress is_user_home function with BuddyPress eq ivalent94 * Filter the bbPress is_user_home function with BuddyPress equivalent 100 95 * 101 96 * @since 2.1.0 bbPress (r3552) … … 578 573 $retval = (bool) ! empty( $group_ids ); 579 574 575 // Filter & return 580 576 return (bool) apply_filters( 'bbp_is_forum_group_forum', $retval, $forum_id, $group_ids ); 581 577 } … … 748 744 */ 749 745 function bbp_get_activity_actions() { 750 return apply_filters( 'bbp_get_activity_actions', array( 746 747 // Filter & return 748 return (array) apply_filters( 'bbp_get_activity_actions', array( 751 749 'topic' => __( '%1$s started the topic %2$s in the forum %3$s', 'bbpress' ), 752 750 'reply' => __( '%1$s replied to the topic %2$s in the forum %3$s', 'bbpress' )
Note: See TracChangeset
for help on using the changeset viewer.