Changeset 6334 for trunk/src/includes/admin/metaboxes.php
- Timestamp:
- 03/01/2017 02:17:21 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/metaboxes.php
r6273 r6334 669 669 670 670 /** 671 * See who engaged with a topic 672 * 673 * @since 2.6.0 bbPress (r6333) 674 */ 675 function bbp_topic_engagements_metabox( $post ) { 676 677 // Get user IDs 678 $user_ids = bbp_get_topic_engagements( $post->ID ); 679 680 // Output 681 ?><p><?php 682 683 // Relationships 684 $args = array( 685 'include' => $user_ids 686 ); 687 688 // Users were found 689 if ( ! empty( $user_ids ) && bbp_has_users( $args ) ) : 690 691 while ( bbp_users() ) : bbp_the_user(); 692 echo get_avatar( bbp_get_user_id(), 32 ); 693 endwhile; 694 695 // No users 696 else : 697 esc_html_e( 'No users have engaged to this topic.', 'bbpress' ); 698 endif; 699 700 ?></p><?php 701 702 do_action( 'bbp_topic_engagements_metabox', $post ); 703 } 704 705 /** 671 706 * See who marked a topic as a favorite 672 707 * 673 708 * @since 2.6.0 bbPress (r6197) 709 * @since 2.6.0 bbPress (r6333) Updated to use BBP_User_Query 674 710 */ 675 711 function bbp_topic_favorites_metabox( $post ) { … … 681 717 ?><p><?php 682 718 719 // Relationships 720 $args = array( 721 'include' => $user_ids 722 ); 723 683 724 // Users were found 684 if ( ! empty( $user_ids ) ) :685 686 foreach ( $user_ids as $user_id ) :687 echo get_avatar( $user_id, 32 );688 end foreach;725 if ( ! empty( $user_ids ) && bbp_has_users( $args ) ) : 726 727 while ( bbp_users() ) : bbp_the_user(); 728 echo get_avatar( bbp_get_user_id(), 32 ); 729 endwhile; 689 730 690 731 // No users … … 702 743 * 703 744 * @since 2.6.0 bbPress (r6197) 745 * @since 2.6.0 bbPress (r6333) Updated to use BBP_User_Query 704 746 */ 705 747 function bbp_topic_subscriptions_metabox( $post ) { … … 711 753 ?><p><?php 712 754 755 // Relationships 756 $args = array( 757 'include' => $user_ids 758 ); 759 713 760 // Users were found 714 if ( ! empty( $user_ids ) ) :715 716 foreach ( $user_ids as $user_id ) :717 echo get_avatar( $user_id, 32 );718 end foreach;761 if ( ! empty( $user_ids ) && bbp_has_users( $args ) ) : 762 763 while ( bbp_users() ) : bbp_the_user(); 764 echo get_avatar( bbp_get_user_id(), 32 ); 765 endwhile; 719 766 720 767 // No users … … 732 779 * 733 780 * @since 2.6.0 bbPress (r6197) 781 * @since 2.6.0 bbPress (r6333) Updated to use BBP_User_Query 734 782 */ 735 783 function bbp_forum_subscriptions_metabox( $post ) { … … 741 789 ?><p><?php 742 790 791 // Relationships 792 $args = array( 793 'include' => $user_ids 794 ); 795 743 796 // Users were found 744 if ( ! empty( $user_ids ) ) :745 746 foreach ( $user_ids as $user_id ) :747 echo get_avatar( $user_id, 32 );748 end foreach;797 if ( ! empty( $user_ids ) && bbp_has_users( $args ) ) : 798 799 while ( bbp_users() ) : bbp_the_user(); 800 echo get_avatar( bbp_get_user_id(), 32 ); 801 endwhile; 749 802 750 803 // No users
Note: See TracChangeset
for help on using the changeset viewer.