Changeset 13490 for trunk/src/bp-groups/bp-groups-template.php
- Timestamp:
- 05/26/2023 04:51:42 AM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-groups/bp-groups-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r13451 r13490 2567 2567 2568 2568 /** 2569 * Since BuddyPress 1.0, this generated the group settings admin/member screen.2570 * As of BuddyPress 1.5 (r4489), and because this function outputs HTML, it was moved into /bp-default/groups/single/admin.php.2571 *2572 * @deprecated 1.52573 * @deprecated No longer used.2574 * @since 1.0.02575 * @todo Remove in 1.42576 *2577 * @param bool $admin_list2578 * @param bool $group2579 */2580 function bp_group_admin_memberlist( $admin_list = false, $group = false ) {2581 global $groups_template;2582 2583 _deprecated_function( __FUNCTION__, '1.5', 'No longer used. See /bp-default/groups/single/admin.php' );2584 2585 if ( empty( $group ) ) {2586 $group =& $groups_template->group;2587 }2588 2589 2590 if ( $admins = groups_get_group_admins( $group->id ) ) : ?>2591 2592 <ul id="admins-list" class="item-list<?php if ( !empty( $admin_list ) ) : ?> single-line<?php endif; ?>">2593 2594 <?php foreach ( (array) $admins as $admin ) { ?>2595 2596 <?php if ( !empty( $admin_list ) ) : ?>2597 2598 <li>2599 2600 <?php2601 echo bp_core_fetch_avatar(2602 array(2603 'item_id' => $admin->user_id,2604 'type' => 'thumb',2605 'width' => 30,2606 'height' => 30,2607 'alt' => sprintf(2608 /* translators: %s: member name */2609 __( 'Profile picture of %s', 'buddypress' ),2610 bp_core_get_user_displayname( $admin->user_id )2611 ),2612 )2613 );2614 ?>2615 2616 <h5>2617 2618 <?php echo bp_core_get_userlink( $admin->user_id ); ?>2619 2620 <span class="small">2621 <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link($admin->user_id) ?>"><?php _e( 'Demote to Member', 'buddypress' ) ?></a>2622 </span>2623 </h5>2624 </li>2625 2626 <?php else : ?>2627 2628 <li>2629 2630 <?php2631 echo bp_core_fetch_avatar(2632 array(2633 'item_id' => $admin->user_id,2634 'type' => 'thumb',2635 'alt' => sprintf(2636 /* translators: %s: member name */2637 __( 'Profile picture of %s', 'buddypress' ),2638 bp_core_get_user_displayname( $admin->user_id )2639 ),2640 )2641 );2642 ?>2643 2644 <h5><?php echo bp_core_get_userlink( $admin->user_id ) ?></h5>2645 <span class="activity">2646 <?php2647 /* translators: %s: human time diff */2648 echo bp_core_get_last_activity( strtotime( $admin->date_modified ), __( 'joined %s', 'buddypress') );2649 ?>2650 </span>2651 2652 <?php if ( bp_is_active( 'friends' ) ) : ?>2653 2654 <div class="action">2655 2656 <?php bp_add_friend_button( $admin->user_id ); ?>2657 2658 </div>2659 2660 <?php endif; ?>2661 2662 </li>2663 2664 <?php endif;2665 } ?>2666 2667 </ul>2668 2669 <?php else : ?>2670 2671 <div id="message" class="info">2672 <p><?php _e( 'This group has no administrators', 'buddypress' ); ?></p>2673 </div>2674 2675 <?php endif;2676 }2677 2678 /**2679 * Generate the HTML for a list of group moderators.2680 *2681 * No longer used.2682 *2683 * @todo Deprecate.2684 *2685 * @param bool $admin_list2686 * @param bool $group2687 */2688 function bp_group_mod_memberlist( $admin_list = false, $group = false ) {2689 global $groups_template;2690 2691 if ( empty( $group ) ) {2692 $group =& $groups_template->group;2693 }2694 2695 if ( $group_mods = groups_get_group_mods( $group->id ) ) { ?>2696 2697 <ul id="mods-list" class="item-list<?php if ( $admin_list ) { ?> single-line<?php } ?>">2698 2699 <?php foreach ( (array) $group_mods as $mod ) { ?>2700 2701 <?php if ( !empty( $admin_list ) ) { ?>2702 2703 <li>2704 2705 <?php2706 /* translators: %s: member name */2707 echo bp_core_fetch_avatar(2708 array(2709 'item_id' => $mod->user_id,2710 'type' => 'thumb',2711 'width' => 30,2712 'height' => 30,2713 'alt' => sprintf(2714 /* translators: %s: member name */2715 __( 'Profile picture of %s', 'buddypress' ),2716 bp_core_get_user_displayname( $mod->user_id )2717 ),2718 )2719 );2720 ?>2721 2722 <h5>2723 <?php echo bp_core_get_userlink( $mod->user_id ); ?>2724 2725 <span class="small">2726 <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => $mod->user_id ) ) ?>" class="button confirm mod-promote-to-admin"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>2727 <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link($mod->user_id) ?>"><?php _e( 'Demote to Member', 'buddypress' ) ?></a>2728 </span>2729 </h5>2730 </li>2731 2732 <?php } else { ?>2733 2734 <li>2735 2736 <?php2737 echo bp_core_fetch_avatar(2738 array(2739 'item_id' => $mod->user_id,2740 'type' => 'thumb',2741 'alt' => sprintf(2742 /* translators: %s: member name */2743 __( 'Profile picture of %s', 'buddypress' ),2744 bp_core_get_user_displayname( $mod->user_id )2745 ),2746 )2747 );2748 ?>2749 2750 <h5><?php echo bp_core_get_userlink( $mod->user_id ) ?></h5>2751 2752 <span class="activity">2753 <?php2754 /* translators: %s: human time diff */2755 echo bp_core_get_last_activity( strtotime( $mod->date_modified ), __( 'joined %s', 'buddypress') );2756 ?>2757 </span>2758 2759 <?php if ( bp_is_active( 'friends' ) ) : ?>2760 2761 <div class="action">2762 <?php bp_add_friend_button( $mod->user_id ) ?>2763 </div>2764 2765 <?php endif; ?>2766 2767 </li>2768 2769 <?php } ?>2770 <?php } ?>2771 2772 </ul>2773 2774 <?php } else { ?>2775 2776 <div id="message" class="info">2777 <p><?php _e( 'This group has no moderators', 'buddypress' ); ?></p>2778 </div>2779 2780 <?php }2781 }2782 2783 /**2784 2569 * Determine whether a group has moderators. 2785 2570 *
Note: See TracChangeset
for help on using the changeset viewer.