Skip to:
Content

bbPress.org

Ticket #3177: 3177.diff

File 3177.diff, 3.2 KB (added by espellcaste, 3 years ago)
  • src/includes/users/engagements.php

     
    689689 *
    690690 * @since 2.6.0 bbPress (r5156)
    691691 *
    692  * @param int $object_id Optional. ID of forum, topic, or something else
     692 * @param int $object_id Optional. ID of object (forum, topic, or something else)
    693693 */
    694694function bbp_get_subscribers( $object_id = 0, $type = 'post' ) {
    695695        $users = bbp_get_users_for_object( $object_id, '_bbp_subscription', $type );
     
    704704 * @since 2.0.0 bbPress (r2668)
    705705 * @since 2.6.0 bbPress (r6618) Signature changed to accept an array of arguments
    706706 *
    707  * @param array $args Optional. Arguments to pass into bbp_has_replies()
     707 * @param array $args Optional. Arguments to pass into bbp_has_topics()
    708708 *
    709  * @return bool True if user has forum subscriptions, otherwise false
     709 * @return bool True if user has topic subscriptions, otherwise false
    710710 */
    711711function bbp_get_user_topic_subscriptions( $args = array() ) {
    712712
     
    749749 * @since 2.5.0 bbPress (r5156)
    750750 * @since 2.6.0 bbPress (r6618) Signature changed to accept an array of arguments
    751751 *
    752  * @param array $args Optional. Arguments to pass into bbp_has_replies()
     752 * @param array $args Optional. Arguments to pass into bbp_has_forums()
    753753 *
    754754 * @return bool True if user has forum subscriptions, otherwise false
    755755 */
     
    789789}
    790790
    791791/**
    792  * Check if a topic or forum is in user's subscription list or not
     792 * Check if an onject (forum or topic) is in user's subscription list or not
    793793 *
    794794 * @since 2.5.0 bbPress (r5156)
    795795 *
    796796 * @param int $user_id Optional. User id
    797  * @param int $object_id Optional. Topic id
     797 * @param int $object_id Optional. Object id
    798798 *
    799  * @return bool True if the forum or topic is in user's subscriptions, otherwise false
     799 * @return bool True if the object (forum or topic) is in user's subscriptions, otherwise false
    800800 */
    801801function bbp_is_user_subscribed( $user_id = 0, $object_id = 0, $type = 'post' ) {
    802802        $retval = bbp_is_object_of_user( $object_id, $user_id, '_bbp_subscription', $type );
     
    812812 * @since 2.6.0 bbPress (r6544) Added $type parameter
    813813 *
    814814 * @param int    $user_id   Optional. User id
    815  * @param int    $object_id Optional. Topic id
     815 * @param int    $object_id Optional. Object id
    816816 * @param string $type      Optional. Type of object being subscribed to
    817817 *
    818  * @return bool Always true
     818 * @return bool True if the object was added in the user subscriptions, otherwise false
    819819 */
    820820function bbp_add_user_subscription( $user_id = 0, $object_id = 0, $type = 'post' ) {
    821821
     
    846846 * @since 2.6.0 bbPress (r6544) Added $type parameter
    847847 *
    848848 * @param int    $user_id   Optional. User id
    849  * @param int    $object_id Optional. Topic id
     849 * @param int    $object_id Optional. Object id
    850850 * @param string $type      Optional. Type of object being subscribed to
    851851 *
    852  * @return bool True if the topic was removed from user's subscriptions,
     852 * @return bool True if the object was removed from user's subscriptions,
    853853 *               otherwise false
    854854 */
    855855function bbp_remove_user_subscription( $user_id = 0, $object_id = 0, $type = 'post' ) {