Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/19/2013 09:41:08 PM (11 years ago)
Author:
djpaul
Message:

Quick audit of existing phpDoc @param, @return, and @since parameters. Fixes #5031

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-functions.php

    r7163 r7228  
    121121 * @package BuddyPress Core
    122122 * @global $current_user WordPress global variable containing current logged in user information
    123  * @param user_id The ID of the user.
     123 * @param int $user_id The ID of the user.
    124124 */
    125125function bp_core_get_user_domain( $user_id, $user_nicename = false, $user_login = false ) {
     
    151151 *
    152152 * @package BuddyPress Core
    153  * @param user_id The ID of the user.
     153 * @param int $user_id The ID of the user.
    154154 * @uses BP_Core_User::get_core_userdata() Performs the query.
    155155 */
     
    171171 * @package BuddyPress Core
    172172 * @uses bp_core_get_userid_from_user_login() Returns the user id for the username passed
    173  * @return The user id for the user that is currently being displayed, return zero if this is not a user home and just a normal blog.
     173 * @return int The user id for the user that is currently being displayed, return zero if this is not a user home and just a normal blog.
    174174 */
    175175function bp_core_get_displayed_userid( $user_login ) {
     
    181181 *
    182182 * @package BuddyPress Core
    183  * @param $username str Username to check.
     183 * @param string $username Username to check.
    184184 * @global $wpdb WordPress DB access object.
    185  * @return false on no match
    186  * @return int the user ID of the matched user.
     185 * @return int|bool The ID of the matched user, or false.
    187186 */
    188187function bp_core_get_userid( $username ) {
     
    199198 *
    200199 * @package BuddyPress Core
    201  * @param $username str Username to check.
     200 * @param string $username Username to check.
    202201 * @global $wpdb WordPress DB access object.
    203  * @return false on no match
    204  * @return int the user ID of the matched user.
     202 * @return int|bool The ID of the matched user, or false.
    205203 */
    206204function bp_core_get_userid_from_nicename( $user_nicename ) {
     
    217215 *
    218216 * @package BuddyPress Core
    219  * @param $uid int User ID to check.
     217 * @param int $uid User ID to check.
    220218 * @global $userdata WordPress user data for the current logged in user.
    221219 * @uses get_userdata() WordPress function to fetch the userdata for a user ID
    222  * @return false on no match
    223  * @return str the username of the matched user.
     220 * @return string|bool The username of the matched user, or false.
    224221 */
    225222function bp_core_get_username( $user_id, $user_nicename = false, $user_login = false ) {
     
    291288 *
    292289 * @package BuddyPress Core
    293  * @param $uid int User ID to check.
     290 * @param int $uid User ID to check.
    294291 * @global $userdata WordPress user data for the current logged in user.
    295292 * @uses get_userdata() WordPress function to fetch the userdata for a user ID
    296  * @return false on no match
    297  * @return str the username of the matched user.
     293 * @return string|bool The username of the matched user, or false.
    298294 */
    299295function bp_members_get_user_nicename( $user_id ) {
     
    344340 *
    345341 * @package BuddyPress Core
    346  * @param $uid int User ID to check.
     342 * @param int $uid User ID to check.
    347343 * @uses get_userdata() WordPress function to fetch the userdata for a user ID
    348  * @return false on no match
    349  * @return str The email for the matched user.
     344 * @return string The email for the matched user. Empty string if no user matched the $uid.
    350345 */
    351346function bp_core_get_user_email( $uid ) {
     
    372367 *
    373368 * @param int $user_id User ID to check.
    374  * @param $no_anchor bool Disable URL and HTML and just return full name. Default false.
    375  * @param $just_link bool Disable full name and HTML and just return the URL text. Default false.
    376  * @return false on no match
    377  * @return str The link text based on passed parameters.
     369 * @param bool $no_anchor Disable URL and HTML and just return full name. Default false.
     370 * @param bool $just_link Disable full name and HTML and just return the URL text. Default false.
     371 * @return string|bool The link text based on passed parameters, or false on no match.
    378372 * @todo This function needs to be cleaned up or split into separate functions
    379373 */
     
    407401 * @uses xprofile_set_field_data() Will update the field data for a user based on field name and user id.
    408402 * @uses wp_cache_set() Adds a value to the cache.
    409  * @return str The display name for the user in question.
     403 * @return string|bool The display name for the user in question, or false if user not found.
    410404 */
    411405function bp_core_get_user_displayname( $user_id_or_username ) {
     
    463457 *
    464458 * @package BuddyPress Core
    465  * @param $email str The email address for the user.
     459 * @param string $email The email address for the user.
    466460 * @uses bp_core_get_userlink() BuddyPress function to get a userlink by user ID.
    467461 * @uses get_user_by() WordPress function to get userdata via an email address
    468  * @return str The link to the users home base. False on no match.
     462 * @return string The link to the users home base. False on no match.
    469463 */
    470464function bp_core_get_userlink_by_email( $email ) {
     
    476470 * Returns the user link for the user based on the supplied identifier
    477471 *
    478  * @param $username str If BP_ENABLE_USERNAME_COMPATIBILITY_MODE is set, this will be user_login, otherwise it will be user_nicename.
    479  * @return str The link to the users home base. False on no match.
     472 * @param string $username If BP_ENABLE_USERNAME_COMPATIBILITY_MODE is set, this will be user_login, otherwise it will be user_nicename.
     473 * @return string|bool The link to the users home base, false on no match.
    480474 */
    481475function bp_core_get_userlink_by_username( $username ) {
     
    918912 * redirect them to the home page and stop them from logging in.
    919913 *
    920  * @param obj $user Either the WP_User object or the WP_Error object
    921  * @return obj If the user is not a spammer, return the WP_User object. Otherwise a new WP_Error object.
     914 * @param WP_User|WP_Error $user Either the WP_User object or the WP_Error object
     915 * @return WP_User|WP_Error If the user is not a spammer, return the WP_User object. Otherwise a new WP_Error object.
    922916 *
    923917 * @since BuddyPress (1.1.2)
     
    942936 *
    943937 * @package BuddyPress Core
    944  * @param $user_id The user id for the user to delete usermeta for
     938 * @param int $user_id The user id for the user to delete usermeta for
    945939 * @uses bp_delete_user_meta() deletes a row from the wp_usermeta table based on meta_key
    946940 */
     
    10991093 * @see bp_core_validate_email_address()
    11001094 *
    1101  * @param obj $errors WP_Error object
     1095 * @param WP_Error $errors WP_Error object
    11021096 * @param array $validation_results The return value of a validation function
    11031097 *   like bp_core_validate_email_address()
     
    14141408 * See {@link wpmu_signup_user()} and {@link wpmu_validate_user_signup()}.
    14151409 *
    1416  * @param obj $user Either the WP_User object or the WP_Error object
    1417  * @return obj If the user is not a spammer, return the WP_User object. Otherwise a new WP_Error object.
     1410 * @param WP_User|WP_Error $user Either the WP_User object or the WP_Error object
     1411 * @return WP_User|WP_Error If the user is not a spammer, return the WP_User object. Otherwise a new WP_Error object.
    14181412 *
    14191413 * @since BuddyPress (1.2.2)
Note: See TracChangeset for help on using the changeset viewer.