Changeset 6573 for trunk/src/includes/users/engagements.php
- Timestamp:
- 06/16/2017 09:20:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/users/engagements.php
r6544 r6573 24 24 * @param bool $unique Whether meta key should be unique to the object 25 25 * 26 * @uses add_metadata() To add the user to an object27 *28 26 * @return bool Returns true on success, false on failure 29 27 */ … … 45 43 * @param string $meta_type The relationship type (usually 'post') 46 44 * 47 * @uses delete_metadata() To remove a user from an objects48 *49 45 * @return bool Returns true on success, false on failure 50 46 */ … … 64 60 * @param string $meta_key The relationship key 65 61 * @param string $meta_type The relationship type (usually 'post') 66 *67 * @uses delete_metadata() To remove user from all objects68 62 * 69 63 * @return bool Returns true on success, false on failure … … 86 80 * @param string $meta_type The relationship type (usually 'post') 87 81 * 88 * @uses delete_metadata() To remove all user from an object89 *90 82 * @return bool Returns true on success, false on failure 91 83 */ … … 104 96 * @param string $meta_key The relationship key 105 97 * @param string $meta_type The relationship type (usually 'post') 106 *107 * @uses delete_metadata() To remove users from objects108 98 * 109 99 * @return bool Returns true on success, false on failure … … 124 114 * @param string $meta_key The key used to index this relationship 125 115 * @param string $meta_type The type of meta to look in 126 *127 * @uses get_metadata() To get the users of an object128 116 * 129 117 * @return array Returns ids of users … … 147 135 * @param string $meta_type The relationship type (usually 'post') 148 136 * 149 * @uses bbp_get_users_for_object() To get all users of an object150 *151 137 * @return bool Returns true if object has a user, false if not 152 138 */ … … 167 153 * 168 154 * @param int $topic_id Optional. Topic id 169 * @uses bbp_get_users_for_object() To get user ids who engaged 170 * @uses apply_filters() Calls 'bbp_get_topic_engagements' with the users and 171 * topic id 155 * 172 156 * @return array|bool Results if the topic has any engagements, otherwise false 173 157 */ … … 227 211 * 228 212 * @param int $user_id Optional. User id 229 * @uses bbp_has_topics() To get the topics 230 * @uses apply_filters() Calls 'bbp_get_user_engagements' with the topic query and 231 * user id 213 * 232 214 * @return array|bool Results if user has engaged, otherwise false 233 215 */ … … 254 236 * 255 237 * @param int $user_id Optional. User id 256 * @uses bbp_get_user_id() To get the user id 257 * @uses bbp_get_topic_post_type() To get the topic post type 258 * @uses apply_filters() Calls 'bbp_get_user_engaged_topic_ids' with 259 * the engaged topics and user id 238 * 260 239 * @return array Topic ids if user has engaged, otherwise empty array 261 240 */ … … 285 264 * @param int $user_id Optional. User id 286 265 * @param int $topic_id Optional. Topic id 287 * @uses bbp_get_user_id() To get the user id 288 * @uses bbp_get_topic_id() To get the topic id 289 * @uses bbp_is_object_of_user() To check if the user has engaged 290 * @uses apply_filters() Calls 'bbp_is_user_engaged' with the bool, user id, 291 * topic id and engagements 266 * 292 267 * @return bool True if the topic is in user's engagements, otherwise false 293 268 */ … … 313 288 * @param int $user_id Optional. User id 314 289 * @param int $topic_id Optional. Topic id 315 * @uses bbp_is_user_engaged() To check if the user is engaged in a topic 316 * @uses do_action() Calls 'bbp_add_user_engagement' with the user id and topic id 290 * 317 291 * @return bool Always true 318 292 */ … … 346 320 * @param int $user_id Optional. User id 347 321 * @param int $topic_id Optional. Topic id 348 * @uses bbp_is_user_engaged() To check if the user is engaged in a topic 349 * @uses do_action() Calls 'bbp_remove_user_engagement' with the user & topic id 322 * 350 323 * @return bool True if the topic was removed from user's engagements, otherwise 351 324 * false … … 478 451 * 479 452 * @param int $topic_id Optional. Topic id 480 * @uses bbp_get_users_for_object() To get user IDs who favorited 481 * @uses apply_filters() Calls 'bbp_get_topic_favoriters' with the users and 482 * topic id 453 * 483 454 * @return array|bool Results if the topic has any favoriters, otherwise false 484 455 */ … … 497 468 * 498 469 * @param int $user_id Optional. User id 499 * @uses bbp_has_topics() To get the topics 500 * @uses apply_filters() Calls 'bbp_get_user_favorites' with the topic query and 501 * user id 470 * 502 471 * @return array|bool Results if user has favorites, otherwise false 503 472 */ … … 525 494 * @param int $user_id Optional. User id 526 495 * @param int $topic_id Optional. Topic id 527 * @uses bbp_get_user_id() To get the user id 528 * @uses bbp_get_topic() To get the topic 529 * @uses bbp_get_topic_id() To get the topic id 530 * @uses bbp_is_object_of_user() To check if the user has a favorite 531 * @uses apply_filters() Calls 'bbp_is_user_favorite' with the bool, user id, 532 * topic id and favorites 496 * 533 497 * @return bool True if the topic is in user's favorites, otherwise false 534 498 */ … … 552 516 * @param int $user_id Optional. User id 553 517 * @param int $topic_id Optional. Topic id 554 * @uses bbp_is_user_favorite() To check if the topic is a user favorite 555 * @uses do_action() Calls 'bbp_add_user_favorite' with the user id and topic id 518 * 556 519 * @return bool Always true 557 520 */ … … 587 550 * @param int $user_id Optional. User id 588 551 * @param int $topic_id Optional. Topic id 589 * @uses bbp_is_user_favorite() To check if the topic is a user favorite 590 * @uses do_action() Calls 'bbp_remove_user_favorite' with the user & topic id 591 * @return bool True if the topic was removed from user's favorites, otherwise 592 * false 552 * 553 * @return bool True if the topic was removed from user's favorites, or false 593 554 */ 594 555 function bbp_remove_user_favorite( $user_id, $topic_id ) { … … 620 581 * 621 582 * @param string $action The requested action to compare this function to 622 * @uses bbp_get_user_id() To get the user id623 * @uses bbp_verify_nonce_request() To verify the nonce and check the request624 * @uses current_user_can() To check if the current user can edit the user625 * @uses bbPress:errors:add() To log the error messages626 * @uses bbp_is_user_favorite() To check if the topic is in user's favorites627 * @uses bbp_remove_user_favorite() To remove the user favorite628 * @uses bbp_add_user_favorite() To add the user favorite629 * @uses do_action() Calls 'bbp_favorites_handler' with success, user id, topic630 * id and action631 * @uses bbp_is_favorites() To check if it's the favorites page632 * @uses bbp_get_topic_permalink() To get the topic permalink633 * @uses bbp_redirect() To redirect to the url634 583 */ 635 584 function bbp_favorites_handler( $action = '' ) { … … 730 679 * 731 680 * @param int $object_id Optional. ID of forum, topic, or something else 732 * @uses bbp_get_users_for_object() To get the subscribers733 * @uses apply_filters() Calls 'bbp_get_subscribers' with the subscribers734 * @return array|bool Results if subscribers, otherwise false735 681 */ 736 682 function bbp_get_subscribers( $object_id = 0, $type = 'post' ) { … … 747 693 * 748 694 * @param int $user_id Optional. User id 749 * @uses bbp_has_topics() To get the topics 750 * @uses apply_filters() Calls 'bbp_get_user_subscriptions' with the topic query 751 * and user id 695 * 752 696 * @return array|bool Results if user has subscriptions, otherwise false 753 697 */ … … 774 718 * 775 719 * @param int $user_id Optional. User id 776 * @uses bbp_has_forums() To get the forums 777 * @uses apply_filters() Calls 'bbp_get_user_forum_subscriptions' with the forum 778 * query and user id 720 * 779 721 * @return array|bool Results if user has subscriptions, otherwise false 780 722 */ … … 802 744 * @param int $user_id Optional. User id 803 745 * @param int $object_id Optional. Topic id 804 * @uses get_post() To get the post object 805 * @uses bbp_get_user_subscribed_forum_ids() To get the user's forum subscriptions 806 * @uses bbp_get_user_subscribed_topic_ids() To get the user's topic subscriptions 807 * @uses bbp_get_forum_post_type() To get the forum post type 808 * @uses bbp_get_topic_post_type() To get the topic post type 809 * @uses apply_filters() Calls 'bbp_is_user_subscribed' with the bool, user id, 810 * forum/topic id and subscriptions 746 * 811 747 * @return bool True if the forum or topic is in user's subscriptions, otherwise false 812 748 */ … … 828 764 * @param string $type Optional. Type of object being subscribed to 829 765 * 830 * @uses do_action() Calls 'bbp_add_user_subscription' with the user & object id831 766 * @return bool Always true 832 767 */ … … 863 798 * @param string $type Optional. Type of object being subscribed to 864 799 * 865 * @uses bbp_is_user_subscribed() To check if the user is already subscribed866 * @uses do_action() Calls 'bbp_remove_user_subscription' with the user id and867 * topic id868 800 * @return bool True if the topic was removed from user's subscriptions, 869 801 * otherwise false … … 898 830 * 899 831 * @param string $action The requested action to compare this function to 900 * @uses bbp_is_subscriptions_active() To check if the subscriptions are active901 * @uses bbp_get_user_id() To get the user id902 * @uses bbp_verify_nonce_request() To verify the nonce and check the request903 * @uses current_user_can() To check if the current user can edit the user904 * @uses bbPress:errors:add() To log the error messages905 * @uses bbp_is_user_subscribed() To check if the object is in user's906 * subscriptions907 * @uses bbp_remove_user_subscription() To remove the user subscription908 * @uses bbp_add_user_subscription() To add the user subscription909 * @uses do_action() Calls 'bbp_subscriptions_handler' with success, user id,910 * object id and action911 * @uses bbp_is_subscription() To check if it's the subscription page912 * @uses bbp_redirect() To redirect to the url913 832 */ 914 833 function bbp_subscriptions_handler( $action = '' ) { … … 1014 933 * 1015 934 * @param int $user_id Optional. User id 1016 * @uses bbp_get_user_id() To get the user id 1017 * @uses bbp_get_topic_post_type() To get the topic post type 1018 * @uses apply_filters() Calls 'bbp_get_user_favorites_topic_ids' with 1019 * the favorites and user id 935 * 1020 936 * @return array|bool Results if user has favorites, otherwise null 1021 937 */ … … 1045 961 * 1046 962 * @param int $user_id Optional. User id 1047 * @uses bbp_get_user_id() To get the user id 1048 * @uses bbp_get_forum_post_type() To get the forum post type 1049 * @uses apply_filters() Calls 'bbp_get_user_subscribed_forum_ids' with 1050 * the subscriptions and user id 963 * 1051 964 * @return array|bool Results if user has subscriptions, otherwise null 1052 965 */ … … 1075 988 * 1076 989 * @param int $user_id Optional. User id 1077 * @uses bbp_get_user_id() To get the user id 1078 * @uses bbp_get_topic_post_type() To get the topic post type 1079 * @uses apply_filters() Calls 'bbp_get_user_subscribed_topic_ids' with 1080 * the subscriptions and user id 990 * 1081 991 * @return array|bool Results if user has subscriptions, otherwise null 1082 992 */
Note: See TracChangeset
for help on using the changeset viewer.