Changeset 6438 for trunk/src/includes/users/engagements.php
- Timestamp:
- 05/27/2017 05:04:31 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/users/engagements.php
r6422 r6438 32 32 $retval = add_metadata( $meta_type, $object_id, $meta_key, $user_id, false ); 33 33 34 // Filter & return 34 35 return (bool) apply_filters( 'bbp_add_user_to_object', (bool) $retval, $object_id, $user_id, $meta_key, $meta_type ); 35 36 } … … 54 55 $retval = delete_metadata( $meta_type, $object_id, $meta_key, $user_id, false ); 55 56 57 // Filter & return 56 58 return (bool) apply_filters( 'bbp_remove_user_from_object', (bool) $retval, $object_id, $user_id, $meta_key, $meta_type ); 57 59 } … … 75 77 $retval = wp_parse_id_list( $meta ); 76 78 77 return (array) apply_filters( 'bbp_get_users_for_object', (array) $retval, $object_id, $meta_key, $meta_type ); 79 // Filter & return 80 return (array) apply_filters( 'bbp_get_users_for_object', $retval, $object_id, $meta_key, $meta_type ); 78 81 } 79 82 … … 98 101 $retval = is_numeric( array_search( $user_id, $user_ids, true ) ); 99 102 100 return (bool) apply_filters( 'bbp_is_object_of_user', (bool) $retval, $object_id, $user_id, $meta_key, $meta_type ); 103 // Filter & return 104 return (bool) apply_filters( 'bbp_is_object_of_user', $retval, $object_id, $user_id, $meta_key, $meta_type ); 101 105 } 102 106 … … 118 122 $users = bbp_get_users_for_object( $topic_id, '_bbp_engagement' ); 119 123 124 // Filter & return 120 125 return (array) apply_filters( 'bbp_get_topic_engagements', $users, $topic_id ); 121 126 } … … 144 149 ) ); 145 150 151 // Filter & return 146 152 return apply_filters( 'bbp_get_user_engagements', $engagements, $user_id ); 147 153 } … … 173 179 ) ); 174 180 181 // Filter & return 175 182 return (array) apply_filters( 'bbp_get_user_engaged_topic_ids', $engagements->posts, $user_id ); 176 183 } … … 195 202 $retval = bbp_is_object_of_user( $topic_id, $user_id, '_bbp_engagement' ); 196 203 204 // Filter & return 197 205 return (bool) apply_filters( 'bbp_is_user_engaged', (bool) $retval, $user_id, $topic_id ); 198 206 } … … 288 296 $users = bbp_get_users_for_object( $topic_id, '_bbp_favorite' ); 289 297 298 // Filter & return 290 299 return (array) apply_filters( 'bbp_get_topic_favoriters', $users, $topic_id ); 291 300 } … … 314 323 ) ); 315 324 325 // Filter & return 316 326 return apply_filters( 'bbp_get_user_favorites', $query, $user_id ); 317 327 } … … 343 353 ) ); 344 354 355 // Filter & return 345 356 return (array) apply_filters( 'bbp_get_user_favorites_topic_ids', $favorites->posts, $user_id ); 346 357 } … … 389 400 } 390 401 402 // Filter & return 391 403 return (bool) apply_filters( 'bbp_is_user_favorite', (bool) $retval, $user_id, $topic_id, $favorites ); 392 404 } … … 585 597 $users = bbp_get_users_for_object( $forum_id, '_bbp_subscription' ); 586 598 599 // Filter & return 587 600 return (array) apply_filters( 'bbp_get_forum_subscribers', $users, $forum_id ); 588 601 } … … 602 615 $users = bbp_get_users_for_object( $topic_id, '_bbp_subscription' ); 603 616 617 // Filter & return 604 618 return (array) apply_filters( 'bbp_get_topic_subscribers', $users, $topic_id ); 605 619 } … … 619 633 _deprecated_function( __FUNCTION__, 2.5, 'bbp_get_user_topic_subscriptions()' ); 620 634 $query = bbp_get_user_topic_subscriptions( $user_id ); 635 636 // Filter & return 621 637 return apply_filters( 'bbp_get_user_subscriptions', $query, $user_id ); 622 638 } … … 645 661 ) ); 646 662 663 // Filter & return 647 664 return apply_filters( 'bbp_get_user_topic_subscriptions', $query, $user_id ); 648 665 } … … 671 688 ) ); 672 689 690 // Filter & return 673 691 return apply_filters( 'bbp_get_user_forum_subscriptions', $query, $user_id ); 674 692 } … … 700 718 ) ); 701 719 720 // Filter & return 702 721 return (array) apply_filters( 'bbp_get_user_subscribed_forum_ids', $subscriptions->posts, $user_id ); 703 722 } … … 729 748 ) ); 730 749 750 // Filter & return 731 751 return (array) apply_filters( 'bbp_get_user_subscribed_topic_ids', $subscriptions->posts, $user_id ); 732 752 } … … 783 803 } 784 804 805 // Filter & return 785 806 return (bool) apply_filters( 'bbp_is_user_subscribed', $retval, $user_id, $object_id, $subscribed_ids ); 786 807 } … … 840 861 } 841 862 863 // Filter & return 842 864 return (bool) apply_filters( 'bbp_is_user_subscribed_to_forum', (bool) $retval, $user_id, $forum_id, $subscribed_ids ); 843 865 } … … 897 919 } 898 920 921 // Filter & return 899 922 return (bool) apply_filters( 'bbp_is_user_subscribed_to_topic', (bool) $retval, $user_id, $topic_id, $subscribed_ids ); 900 923 }
Note: See TracChangeset
for help on using the changeset viewer.