Skip to:
Content

BuddyPress.org

Changeset 9877


Ignore:
Timestamp:
05/19/2015 01:40:26 AM (4 years ago)
Author:
tw2113
Message:

First pass at members component docs cleanup.

See #6402.

Location:
trunk/src/bp-members
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/admin/bp-members-admin-classes.php

    r9819 r9877  
    110110     *
    111111     * @since BuddyPress (2.0.0)
     112     *
     113     * @param array $which
    112114     */
    113115    public function extra_tablenav( $which ) {
     
    116118
    117119    /**
    118      * Specific signups columns
     120     * Specific signups columns.
    119121     *
    120122     * @since BuddyPress (2.0.0)
     
    216218     *
    217219     * @see WP_List_Table::single_row() for explanation of params.
     220     *
     221     * @param object|null $signup_object Signup user object.
     222     * @param string      $style         Styles for the row.
     223     * @param string      $role          Role to be assigned to user.
     224     * @param int         $numposts      Numper of posts.
     225     *
     226     * @return string
    218227     */
    219228    public function single_row( $signup_object = null, $style = '', $role = '', $numposts = 0 ) {
     
    349358     *
    350359     * @since BuddyPress (2.0.0)
     360     *
     361     * @param object $signup_object Signup object instance.
     362     *
     363     * @return int
    351364     */
    352365    public function column_count_sent( $signup_object = null ) {
     
    359372     * @since BuddyPress (2.1.0)
    360373     *
    361      * @param object $signup_object The signup data object.
    362      * @param string the column name.
     374     * @param object|null $signup_object The signup data object.
     375     * @param string      $column_name   The column name.
     376     *
     377     * @return string
    363378     */
    364379    function column_default( $signup_object = null, $column_name = '' ) {
     
    458473     * @since BuddyPress (2.0.0)
    459474     *
    460      * @uses WP_MS_Users_List_Table::get_views() to get the users views
     475     * @uses WP_MS_Users_List_Table::get_views() to get the users views.
    461476     */
    462477    public function get_views() {
     
    471486
    472487    /**
    473      * Specific signups columns
     488     * Specific signups columns.
    474489     *
    475490     * @since BuddyPress (2.0.0)
     
    496511
    497512    /**
    498      * Specific bulk actions for signups
     513     * Specific bulk actions for signups.
    499514     *
    500515     * @since BuddyPress (2.0.0)
     
    535550
    536551    /**
    537      * The columns signups can be reordered with
     552     * The columns signups can be reordered with.
    538553     *
    539554     * @since BuddyPress (2.0.0)
     
    566581     *
    567582     * @see WP_List_Table::single_row() for explanation of params.
     583     *
     584     * @param object|null $signup_object Signup user object.
     585     * @param string      $style         Styles for the row.
    568586     */
    569587    public function single_row( $signup_object = null, $style = '' ) {
     
    578596     * @since BuddyPress (2.0.0)
    579597     *
    580      * @param object $signup_object The signup data object.
     598     * @param object|null $signup_object The signup data object.
    581599     */
    582600    public function column_cb( $signup_object = null ) {
     
    667685
    668686    /**
    669      * Display registration date
     687     * Display registration date.
    670688     *
    671689     * @since BuddyPress (2.0.0)
     
    689707     *
    690708     * @since BuddyPress (2.0.0)
     709     *
     710     * @param object|null $signup_object Signup object instance.
    691711     */
    692712    public function column_date_sent( $signup_object = null ) {
     
    706726     *
    707727     * @since BuddyPress (2.0.0)
     728     *
     729     * @param object|null $signup_object Signup object instance.
    708730     */
    709731    public function column_count_sent( $signup_object = null ) {
     
    716738     * @since BuddyPress 2.1.0
    717739     *
    718      * @param object $signup_object The signup data object.
    719      * @param string the column name.
     740     * @param object|null $signup_object The signup data object.
     741     * @param string      $column_name   The column name.
     742     *
     743     * @return string
    720744     */
    721745    function column_default( $signup_object = null, $column_name = '' ) {
  • trunk/src/bp-members/bp-members-actions.php

    r9819 r9877  
    2424 * Note: no longer used in the current state. See the Settings component.
    2525 *
    26  * @param int $user_id Optional. User ID to mark as spam. Defaults to displayed
    27  *        user.
     26 * @param int $user_id Optional. User ID to mark as spam. Defaults to displayed user.
    2827 */
    2928function bp_core_action_set_spammer_status( $user_id = 0 ) {
  • trunk/src/bp-members/bp-members-activity.php

    r9819 r9877  
    1212
    1313/**
    14  * Register the 'new member' activity type
     14 * Register the 'new member' activity type.
    1515 *
    16  * @since  BuddyPress (2.2.0)
     16 * @since BuddyPress (2.2.0)
    1717 *
    1818 * @uses bp_activity_set_action()
     
    4444 * @since BuddyPress (2.2.0)
    4545 *
    46  * @param string $action Static activity action.
     46 * @param string $action   Static activity action.
    4747 * @param object $activity Activity object.
     48 *
    4849 * @return string
    4950 */
     
    7273 *
    7374 * @param array $user Array of userdata passed to bp_core_activated_user hook.
     75 *
     76 * @return bool
    7477 */
    7578function bp_core_new_user_activity( $user ) {
  • trunk/src/bp-members/bp-members-admin.php

    r9819 r9877  
    208208
    209209    /**
    210      * Get the user ID
     210     * Get the user ID.
    211211     *
    212212     * Look for $_GET['user_id']. If anything else, force the user ID to the
     
    233233
    234234    /**
    235      * Can the current user edit the one displayed
     235     * Can the current user edit the one displayed.
    236236     *
    237237     * self profile editing / or bp_moderate check.
     
    241241     * @access public
    242242     * @since BuddyPress (2.1.0)
     243     *
     244     * @param int $user_id ID of the user being checked for edit ability.
     245     *
     246     * @return bool
    243247     */
    244248    private function member_can_edit( $user_id = 0 ) {
     
    263267
    264268    /**
    265      * Get admin notice when saving a user or member profile
     269     * Get admin notice when saving a user or member profile.
    266270     *
    267271     * @since BuddyPress (2.1.0)
     
    464468
    465469    /**
    466      * Highlight the Users menu if on Edit Profile.
    467      *
    468      * + Check if on the user's admin profile
     470     * Highlight the Users menu if on Edit Profile and check if on the user's admin profile.
    469471     *
    470472     * @access public
     
    599601     * @access public
    600602     * @since BuddyPress (2.0.0)
     603     *
     604     * @param object|null $user   User to create profile navigation for.
     605     * @param string      $active Which profile to highlight.
     606     *
     607     * @return string
    601608     */
    602609    public function profile_nav( $user = null, $active = 'WordPress' ) {
     
    11521159     * @since BuddyPress (2.0.0)
    11531160     *
    1154      * @param array $actions WordPress row actions (edit, delete).
    1155      * @param object $user The object for the user row.
     1161     * @param array|string $actions WordPress row actions (edit, delete).
     1162     * @param object       $user    The object for the user row.
     1163     *
    11561164     * @return array Merged actions.
    11571165     */
     
    12061214
    12071215    /**
    1208      * Add a filter to edit profile url in WP Admin Bar
     1216     * Add a filter to edit profile url in WP Admin Bar.
    12091217     *
    12101218     * @access public
     
    12161224
    12171225    /**
    1218      * Filter the profile url
     1226     * Filter the profile url.
    12191227     *
    12201228     * @access public
     
    12221230     *
    12231231     * @uses  user_admin_url()
     1232     *
     1233     * @param string $profile_link Profile Link for admin bar.
     1234     * @param string $url          Profile URL.
     1235     * @param int    $user_id      User ID.
     1236     *
     1237     * @return string
    12241238     */
    12251239    public function filter_adminbar_profile_link( $profile_link = '', $url = '', $user_id = 0 ) {
     
    12311245
    12321246    /**
    1233      * Remove the filter to edit profile url in WP Admin Bar
     1247     * Remove the filter to edit profile url in WP Admin Bar.
    12341248     *
    12351249     * @access public
     
    12481262     * @since BuddyPress (2.0.0)
    12491263     *
    1250      * @param  int $value
    1251      * @param  string $option
    1252      * @param  int $new_value
    1253      * @return int the pagination preferences
     1264     * @param int    $value
     1265     * @param string $option
     1266     * @param int    $new_value
     1267     *
     1268     * @return int The pagination preferences.
    12541269     */
    12551270    public function signup_screen_options( $value = 0, $option = '', $new_value = 0 ) {
     
    12751290     * @since BuddyPress (2.0.0)
    12761291     *
    1277      * @param  WP_User_Query $query The users query.
     1292     * @param WP_User_Query $query The users query.
     1293     *
    12781294     * @return WP_User_Query The users query without the signups.
    12791295     */
     
    13171333     * @since BuddyPress (2.0.0)
    13181334     *
    1319      * @param  array $views WP List Table views.
     1335     * @param array $views WP List Table views.
     1336     *
    13201337     * @return array The views with the signup view added.
    13211338     */
     
    13441361     * @since BuddyPress (2.0.0)
    13451362     *
    1346      * @param  string $class    The name of the class to use.
    1347      * @param  string $required The parent class.
     1363     * @param string $class    The name of the class to use.
     1364     * @param string $required The parent class.
     1365     *
    13481366     * @return WP_List_Table    The List table.
    13491367     */
     
    15691587
    15701588    /**
    1571      * Get admin notice when viewing the sign-up page
     1589     * Get admin notice when viewing the sign-up page.
    15721590     *
    15731591     * @since BuddyPress (2.1.0)
     
    17201738     *
    17211739     * Depending on the context, display
    1722      * - the list of signups
    1723      * - or the delete confirmation screen
    1724      * - or the activate confirmation screen
    1725      * - or the "resend" email confirmation screen
     1740     * - the list of signups,
     1741     * - or the delete confirmation screen,
     1742     * - or the activate confirmation screen,
     1743     * - or the "resend" email confirmation screen.
    17261744     *
    17271745     * Also prepare the admin notices.
     
    18641882     *
    18651883     * @param string $action Delete, activate, or resend activation link.
     1884     *
     1885     * @return string
    18661886     */
    18671887    public function signups_admin_manage( $action = '' ) {
  • trunk/src/bp-members/bp-members-adminbar.php

    r9819 r9877  
    22
    33/**
    4  * BuddyPress Members Toolbar
     4 * BuddyPress Members Toolbar.
    55 *
    66 * Handles the member functions related to the WordPress Toolbar.
  • trunk/src/bp-members/bp-members-classes.php

    r9819 r9877  
    11<?php
    22/**
    3  * BuddyPress Members Classes
     3 * BuddyPress Members Classes.
    44 *
    55 * @package BuddyPress
  • trunk/src/bp-members/bp-members-filters.php

    r9819 r9877  
    22
    33/**
    4  * BuddyPress Members Filters
     4 * BuddyPress Members Filters.
    55 *
    66 * Filters specific to the Members component.
     
    5858
    5959/**
    60  * Make sure the username is not the blog slug in case of root profile & subdirectory blog
     60 * Make sure the username is not the blog slug in case of root profile & subdirectory blog.
    6161 *
    6262 * If BP_ENABLE_ROOT_PROFILES is defined & multisite config is set to subdirectories,
     
    6565 * is not the same than the blog slug for this particular config.
    6666 *
    67  * @since  BuddyPress (2.1.0)
    68  * @param  array $illegal_names
     67 * @since BuddyPress (2.1.0)
     68 *
     69 * @param array $illegal_names
     70 *
    6971 * @return array $illegal_names
    7072 */
     
    99101 * @since BuddyPress (1.6.0)
    100102 *
    101  * @param string $url WP profile edit URL.
    102  * @param int $user_id ID of the user.
     103 * @param string $url     WP profile edit URL.
     104 * @param int    $user_id ID of the user.
    103105 * @param string $scheme
     106 *
    104107 * @return string
    105108 */
  • trunk/src/bp-members/bp-members-functions.php

    r9819 r9877  
    22
    33/**
    4  * BuddyPress Member Functions
     4 * BuddyPress Member Functions.
    55 *
    66 * Functions specific to the members component.
     
    7676 * bp_use_legacy_user_query value, returning true.
    7777 *
    78  * @param array $args {
     78 * @param array|string $args {
    7979 *     Array of arguments. All are optional. See {@link BP_User_Query} for
    8080 *     a more complete description of arguments.
     
    8686 *     @type string       $meta_value      Limit to users with a meta_value (with meta_key). Default: false.
    8787 *     @type array|string $member_type     Array or comma-separated string of member types.
    88  *     @type mixed $include Limit results by user IDs. Default: false.
     88 *     @type mixed        $include        Limit results by user IDs. Default: false.
    8989 *     @type int          $per_page        Results per page. Default: 20.
    9090 *     @type int          $page            Page of results. Default: 1.
     
    154154 * Return the domain for the passed user: e.g. http://example.com/members/andy/.
    155155 *
    156  * @param int $user_id The ID of the user.
    157  * @param string $user_nicename Optional. user_nicename of the user.
    158  * @param string $user_login Optional. user_login of the user.
     156 * @param int         $user_id       The ID of the user.
     157 * @param string|bool $user_nicename Optional. user_nicename of the user.
     158 * @param string|bool $user_login    Optional. user_login of the user.
     159 *
     160 * @return string
    159161 */
    160162function bp_core_get_user_domain( $user_id = 0, $user_nicename = false, $user_login = false ) {
     
    194196 *
    195197 * @param int $user_id The ID of the user.
     198 *
    196199 * @return array
    197200 */
     
    224227 *
    225228 * @param string $user_login user_login of the user being queried.
     229 *
    226230 * @return int
    227231 */
     
    236240 *
    237241 * @param string $username user_login to check.
     242 *
    238243 * @return int|null The ID of the matched user on success, null on failure.
    239244 */
     
    262267 *
    263268 * @param string $user_nicename user_nicename to check.
     269 *
    264270 * @return int|null The ID of the matched user on success, null on failure.
    265271 */
     
    288294 * so it will return the user_login or user_nicename as appropriate.
    289295 *
    290  * @param int $user_id User ID to check.
    291  * @param string $user_nicename Optional. user_nicename of user being checked.
    292  * @param string $user_login Optional. user_login of user being checked.
     296 * @param int         $user_id       User ID to check.
     297 * @param string|bool $user_nicename Optional. user_nicename of user being checked.
     298 * @param string|bool $user_login    Optional. user_login of user being checked.
     299 *
    293300 * @return string|bool The username of the matched user, or false.
    294301 */
     
    374381 *
    375382 * @param int $user_id User ID to check.
     383 *
    376384 * @return string|bool The username of the matched user, or false.
    377385 */
     
    431439 *
    432440 * @param int $uid User ID to check.
     441 *
    433442 * @return string The email for the matched user. Empty string if no user
    434  *         matched the $uid.
     443 *                matched the $uid.
    435444 */
    436445function bp_core_get_user_email( $uid ) {
     
    468477 * Optional parameters will return just the name or just the URL.
    469478 *
    470  * @param int $user_id User ID to check.
     479 * @param int  $user_id  User ID to check.
    471480 * @param bool $no_anchor Disable URL and HTML and just return full name.
    472  *        Default: false.
     481 *                        Default: false.
    473482 * @param bool $just_link Disable full name and HTML and just return the URL
    474  *        text. Default false.
     483 *                        text. Default false.
     484 *
    475485 * @return string|bool The link text based on passed parameters, or false on
    476  *         no match.
     486 *                     no match.
    477487 */
    478488function bp_core_get_userlink( $user_id, $no_anchor = false, $just_link = false ) {
     
    515525 *
    516526 * @param array $user_ids
     527 *
     528 * @return array
    517529 */
    518530function bp_core_get_user_displaynames( $user_ids ) {
     
    593605 *
    594606 * @param int|string $user_id_or_username User ID or username.
     607 *
    595608 * @return string|bool The display name for the user in question, or false if
    596  *         user not found.
     609 *                     user not found.
    597610 */
    598611function bp_core_get_user_displayname( $user_id_or_username ) {
     
    638651 *
    639652 * @param string $email The email address for the user.
     653 *
    640654 * @return string The link to the users home base. False on no match.
    641655 */
     
    657671 *
    658672 * @param string $username If BP_ENABLE_USERNAME_COMPATIBILITY_MODE is set,
    659  *        this should be user_login, otherwise it should be user_nicename.
     673 *                         this should be user_login, otherwise it should
     674 *                         be user_nicename.
     675 *
    660676 * @return string|bool The link to the user's domain, false on no match.
    661677 */
     
    708724
    709725/**
    710  * Return the total number of members, limited to those members with last_activity
    711  *
    712  * @return int The number of active members
     726 * Return the total number of members, limited to those members with last_activity.
     727 *
     728 * @return int The number of active members.
    713729 */
    714730function bp_core_get_active_member_count() {
     
    754770 * @since BuddyPress (1.6.0)
    755771 *
    756  * @param int $user_id The ID of the user being spammed/hammed.
    757  * @param string $status 'spam' if being marked as spam, 'ham' otherwise.
    758  * @param bool $do_wp_cleanup True to force the cleanup of WordPress content
    759  *        and status, otherwise false. Generally, this should only be false if
    760  *        WordPress is expected to have performed this cleanup independently,
    761  *        as when hooked to 'make_spam_user'.
     772 * @param int    $user_id       The ID of the user being spammed/hammed.
     773 * @param string $status        'spam' if being marked as spam, 'ham' otherwise.
     774 * @param bool   $do_wp_cleanup True to force the cleanup of WordPress content
     775 *                              and status, otherwise false. Generally, this should
     776 *                              only be false if WordPress is expected to have
     777 *                              performed this cleanup independently, as when hooked
     778 *                              to 'make_spam_user'.
     779 *
    762780 * @return bool True on success, false on failure.
    763781 */
     
    884902    return true;
    885903}
    886 
    887904/**
    888905 * Hook to WP's make_spam_user and run our custom BP spam functions.
     
    913930 *
    914931 * @param int $user_id The ID for the user.
     932 *
    915933 * @return bool True if spammer, otherwise false.
    916934 */
     
    977995 *
    978996 * @param int $user_id The ID for the user.
     997 *
    979998 * @return bool True if deleted, otherwise false.
    980999 */
     
    10481067 *
    10491068 * @param int $user_id The user ID to check.
     1069 *
    10501070 * @return bool True if active, otherwise false.
    10511071 */
     
    10841104 *       bp_is_user_active().
    10851105 *
    1086  * @uses is_user_logged_in() To check if user is logged in
    1087  * @uses bp_get_displayed_user_id() To get current user ID
    1088  * @uses bp_is_user_active() To check if user is active
     1106 * @uses is_user_logged_in() To check if user is logged in.
     1107 * @uses bp_get_displayed_user_id() To get current user ID.
     1108 * @uses bp_is_user_active() To check if user is active.
    10891109 *
    10901110 * @param int $user_id The user ID to check.
     1111 *
    10911112 * @return bool True if inactive, otherwise false.
    10921113 */
     
    11121133 * @since BuddyPress (1.9.0)
    11131134 *
    1114  * @param int $user_id ID of the user being updated.
    1115  * @param string $time Time of last activity, in 'Y-m-d H:i:s' format.
     1135 * @param int    $user_id ID of the user being updated.
     1136 * @param string $time    Time of last activity, in 'Y-m-d H:i:s' format.
     1137 *
    11161138 * @return bool True on success, false on failure.
    11171139 */
     
    11571179 * @access private For internal use only.
    11581180 *
    1159  * @param null $retval
    1160  * @param int $object_id ID of the user.
    1161  * @param string $meta_key Meta key being fetched.
     1181 * @param null   $retval
     1182 * @param int    $object_id ID of the user.
     1183 * @param string $meta_key  Meta key being fetched.
     1184 *
     1185 * @return mixed
    11621186 */
    11631187function _bp_get_user_meta_last_activity_warning( $retval, $object_id, $meta_key ) {
     
    11901214 * @access private For internal use only.
    11911215 *
    1192  * @param int $meta_id ID of the just-set usermeta row.
    1193  * @param int $object_id ID of the user.
    1194  * @param string $meta_key Meta key being fetched.
     1216 * @param int    $meta_id    ID of the just-set usermeta row.
     1217 * @param int    $object_id ID of the user.
     1218 * @param string $meta_key   Meta key being fetched.
    11951219 * @param string $meta_value Active time.
    11961220 */
     
    12071231 *
    12081232 * @param int $user_id The ID of the user.
     1233 *
    12091234 * @return string Time of last activity, in 'Y-m-d H:i:s' format, or an empty
    1210  *         string if none is found.
     1235 *                string if none is found.
    12111236 */
    12121237function bp_get_user_last_activity( $user_id = 0 ) {
     
    12661291 *
    12671292 * @param int $user_id ID of the user being queried.
     1293 *
    12681294 * @return array Post IDs.
    12691295 */
     
    12841310 *
    12851311 * @param int $user_id Optional. ID of the user to be deleted. Default: the
    1286  *        logged-in user.
     1312 *                     logged-in user.
    12871313 * @return bool True on success, false on failure.
    12881314 */
     
    13531379 *
    13541380 * @param int $user_id ID of the user who is about to be deleted.
     1381 *
    13551382 * @return bool True on success, false on failure.
    13561383 */
     
    13701397 *
    13711398 * @param string $str String to be upper-cased.
     1399 *
    13721400 * @return string
    13731401 */
     
    13901418 *
    13911419 * @param WP_User|WP_Error $user Either the WP_User object or the WP_Error
    1392  *        object, as passed to the 'authenticate' filter.
     1420 *                               object, as passed to the 'authenticate' filter.
     1421 *
    13931422 * @return WP_User|WP_Error If the user is not a spammer, return the WP_User
    1394  *         object. Otherwise a new WP_Error object.
     1423 *                          object. Otherwise a new WP_Error object.
    13951424 */
    13961425function bp_core_boot_spammer( $user ) {
     
    14631492 * Add BuddyPress-specific items to the illegal_names array.
    14641493 *
    1465  * @param array|string $value Illegal names as being saved defined in
    1466  *        Multisite settings.
     1494 * @param array|string $value    Illegal names as being saved defined in
     1495 *                               Multisite settings.
    14671496 * @param array|string $oldvalue The old value of the option.
     1497 *
    14681498 * @return array Merged and unique array of illegal names.
    14691499 */
     
    15551585 * @since BuddyPress (1.6.2)
    15561586 *
    1557  * @param string $user_email The email being checked
     1587 * @param string $user_email The email being checked.
     1588 *
    15581589 * @return bool|array True if the address passes all checks; otherwise an array
    1559  *         of error codes.
     1590 *                    of error codes.
    15601591 */
    15611592function bp_core_validate_email_address( $user_email ) {
     
    16061637 * @see bp_core_validate_email_address()
    16071638 *
    1608  * @param WP_Error $errors WP_Error object.
    1609  * @param array $validation_results The return value of a validation function
    1610  *        like bp_core_validate_email_address().
     1639 * @param WP_Error $errors             WP_Error object.
     1640 * @param array    $validation_results The return value of a validation function
     1641 *                                     like bp_core_validate_email_address().
    16111642 */
    16121643function bp_core_add_validation_error_messages( WP_Error $errors, $validation_results ) {
     
    16311662 * Validate a user name and email address when creating a new user.
    16321663 *
    1633  * @param string $user_name Username to validate.
     1664 * @param string $user_name  Username to validate.
    16341665 * @param string $user_email Email address to validate.
     1666 *
    16351667 * @return array Results of user validation including errors, if any.
    16361668 */
     
    17361768 * @todo Why do we have this wrapper?
    17371769 *
    1738  * @param string $blog_url Blog URL requested during registration.
     1770 * @param string $blog_url   Blog URL requested during registration.
    17391771 * @param string $blog_title Blog title requested during registration.
     1772 *
    17401773 * @return array
    17411774 */
     
    17601793 * @todo There appears to be a bug in the return value on success.
    17611794 *
    1762  * @param string $user_login Login name requested by the user.
     1795 * @param string $user_login    Login name requested by the user.
    17631796 * @param string $user_password Password requested by the user.
    1764  * @param string $user_email Email address entered by the user.
    1765  * @param array $usermeta Miscellaneous metadata about the user (blog-specific
    1766  *        signup data, xprofile data, etc).
     1797 * @param string $user_email    Email address entered by the user.
     1798 * @param array  $usermeta      Miscellaneous metadata about the user (blog-specific
     1799 *                              signup data, xprofile data, etc).
     1800 *
    17671801 * @return bool|WP_Error True on success, WP_Error on failure.
    17681802 */
     
    18561890 *
    18571891 * @param string $blog_domain Domain requested by user.
    1858  * @param string $blog_path Path requested by user.
    1859  * @param string $blog_title Title as entered by user.
    1860  * @param string $user_name user_login of requesting user.
    1861  * @param string $user_email Email address of requesting user.
    1862  * @param string $usermeta Miscellaneous metadata for the user.
     1892 * @param string $blog_path   Path requested by user.
     1893 * @param string $blog_title  Title as entered by user.
     1894 * @param string $user_name   user_login of requesting user.
     1895 * @param string $user_email  Email address of requesting user.
     1896 * @param string $usermeta    Miscellaneous metadata for the user.
     1897 *
     1898 * @return bool
    18631899 */
    18641900function bp_core_signup_blog( $blog_domain, $blog_path, $blog_title, $user_name, $user_email, $usermeta ) {
     
    18841920 *
    18851921 * @param string $key Activation key.
     1922 *
    18861923 * @return int|bool User ID on success, false on failure.
    18871924 */
     
    21252162 *
    21262163 * @param int $user_id ID of the user.
     2164 *
     2165 * @return bool
    21272166 */
    21282167function bp_core_map_user_registration( $user_id ) {
     
    21872226 * Send activation email to a newly registered user.
    21882227 *
    2189  * @param int $user_id ID of the new user.
     2228 * @param int    $user_id    ID of the new user.
    21902229 * @param string $user_email Email address of the new user.
    2191  * @param string $key Activation key.
     2230 * @param string $key        Activation key.
    21922231 */
    21932232function bp_core_signup_send_validation_email( $user_id, $user_email, $key ) {
     
    22482287 * Display a "resend email" link when an unregistered user attempts to log in.
    22492288 *
    2250  * @param WP_User|WP_Error $user Either the WP_User or the WP_Error object
    2251  * @param string $username The inputted, attempted username.
    2252  * @param string $password The inputted, attempted password.
     2289 * @since BuddyPress (1.2.2)
     2290 *
     2291 * @param WP_User|WP_Error $user     Either the WP_User or the WP_Error object.
     2292 * @param string           $username The inputted, attempted username.
     2293 * @param string           $password The inputted, attempted password.
     2294 *
    22532295 * @return WP_User|WP_Error
    2254  *
    2255  * @since BuddyPress (1.2.2)
    22562296 */
    22572297function bp_core_signup_disable_inactive( $user = null, $username = '', $password ='' ) {
     
    25262566 * @since BuddyPress (2.2.0)
    25272567 *
    2528  * @param  string $member_type The name of the member type.
     2568 * @param string $member_type The name of the member type.
     2569 *
    25292570 * @return object A member type object.
    25302571 */
     
    25532594 *                               element from the array needs to match; 'and' means all elements
    25542595 *                               must match. Accepts 'or' or 'and'. Default 'and'.
     2596 *
    25552597 * @return array A list of member type names or objects.
    25562598 */
     
    26602702 * @since BuddyPress (2.2.0)
    26612703 *
    2662  * @param  int               $user_id ID of the user.
    2663  * @param  bool              $single  Optional. Whether to return a single type string. If multiple types are found
    2664  *                                    for the user, the oldest one will be returned. Default: true.
     2704 * @param int               $user_id ID of the user.
     2705 * @param bool              $single  Optional. Whether to return a single type string. If multiple types are found
     2706 *                                   for the user, the oldest one will be returned. Default: true.
     2707 *
    26652708 * @return string|array|bool On success, returns a single member type (if $single is true) or an array of member
    26662709 *                           types (if $single is false). Returns false on failure.
     
    27042747 * @since BuddyPress (2.3.0)
    27052748 *
    2706  * @param  int    $user_id     $user_id ID of the user.
    2707  * @param  string $member_type Member Type.
     2749 * @param int    $user_id     $user_id ID of the user.
     2750 * @param string $member_type Member Type.
     2751 *
    27082752 * @return bool Whether the user has the given member type.
    27092753 */
     
    27292773 * @since BuddyPress (2.2.0)
    27302774 *
    2731  * @param  int $user_id ID of the user.
     2775 * @param int $user_id ID of the user.
     2776 *
    27322777 * @return See {@see bp_set_member_type()}.
    27332778 */
  • trunk/src/bp-members/bp-members-loader.php

    r9819 r9877  
    22
    33/**
    4  * BuddyPress Member Loader
     4 * BuddyPress Member Loader.
    55 *
    66 * @package BuddyPress
     
    1212
    1313class BP_Members_Component extends BP_Component {
     14
    1415    /**
    1516     * Member types.
     
    214215     *
    215216     * @param array $main_nav Optional. See BP_Component::setup_nav() for
    216      *        description.
    217      * @param array $sub_nav Optional. See BP_Component::setup_nav() for
    218      *        description.
     217     *                        description.
     218     * @param array $sub_nav  Optional. See BP_Component::setup_nav() for
     219     *                        description.
    219220     */
    220221    public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
     
    280281
    281282    /**
    282      * Setup cache groups
     283     * Setup cache groups.
    283284     *
    284285     * @since BuddyPress (2.2.0)
  • trunk/src/bp-members/bp-members-screens.php

    r9819 r9877  
    22
    33/**
    4  * BuddyPress Member Screens
     4 * BuddyPress Member Screens.
    55 *
    66 * Handlers for member screens that aren't handled elsewhere.
     
    294294 */
    295295function bp_core_screen_activation() {
    296    
     296
    297297    // Bail if not viewing the activation page
    298298    if ( ! bp_is_current_component( 'activate' ) ) {
     
    522522     *
    523523     * @param string $templates The templates from
    524      *        bp_get_theme_compat_templates().
     524     *                          bp_get_theme_compat_templates().
     525     *
    525526     * @return array $templates Array of custom templates to look for.
    526527     */
     
    592593
    593594    /**
    594      * Setup the groups component theme compatibility
     595     * Setup the groups component theme compatibility.
    595596     *
    596597     * @since BuddyPress (1.7.0)
     
    632633     *
    633634     * @param string $templates The templates from bp_get_theme_compat_templates().
     635     *
    634636     * @return array $templates Array of custom templates to look for.
    635637     */
  • trunk/src/bp-members/bp-members-template.php

    r9819 r9877  
    22
    33/**
    4  * BuddyPress Member Template Tags
     4 * BuddyPress Member Template Tags.
    55 *
    66 * Functions that are safe to use inside your template files and themes.
     
    232232
    233233    /**
    234      * The unique string used for pagination queries
     234     * The unique string used for pagination queries.
    235235     *
    236236     * @access public
    237      * @var public
     237     * @var string
    238238     */
    239239    public $pag_arg;
     
    243243     *
    244244     * @access public
    245      * @var public
     245     * @var string
    246246     */
    247247    public $pag_page;
     
    251251     *
    252252     * @access public
    253      * @var public
     253     * @var string
    254254     */
    255255    public $pag_num;
     
    287287     * @param array        $meta_key        Limit to users with a meta_key.
    288288     * @param array        $meta_value      Limit to users with a meta_value (with meta_key).
    289      * @param array        $page_arg        Optional. The string used as a query parameter in pagination links.
     289     * @param string       $page_arg        Optional. The string used as a query parameter in pagination links.
    290290     *                                      Default: 'upage'.
    291291     * @param array|string $member_type     Array or comma-separated string of member types to limit results to.
     
    467467 * @global object $members_template {@link BP_Members_Template}
    468468 *
    469  * @param array $args {
     469 * @param array|string $args {
    470470 *     Arguments for limiting the contents of the members loop. Most arguments
    471471 *     are in the same format as {@link BP_User_Query}. However, because
     
    497497 *     @type string                $search_terms    Limit results by a search term. Default: null.
    498498 *     @type string                $meta_key        Limit results by the presence of a usermeta key.
    499  *           Default: false.
     499 *                                                  Default: false.
    500500 *     @type mixed                 $meta_value      When used with meta_key, limits results by the
    501  *           a matching usermeta value. Default: false.
     501 *                                                  a matching usermeta value. Default: false.
    502502 *     @type bool                  $populate_extras Whether to fetch optional data, such as
    503  *           friend counts. Default: true.
     503 *                                                  friend counts. Default: true.
    504504 * }
    505505 * @return bool Returns true when blogs are found, otherwise false.
     
    862862 * @see bp_get_member_avatar() for description of arguments.
    863863 *
    864  * @param array $args See {@link bp_get_member_avatar()}.
     864 * @param array|string $args See {@link bp_get_member_avatar()}.
    865865 */
    866866function bp_member_avatar( $args = '' ) {
     
    872872     *
    873873     * @param string $value Formatted HTML <img> element,
    874      *                      or raw avatar URL based on $html arg
     874     *                      or raw avatar URL based on $html arg.
    875875     */
    876876    echo apply_filters( 'bp_member_avatar', bp_get_member_avatar( $args ) );
     
    882882     *      return values.
    883883     *
    884      * @param array $args  {
     884     * @param array|string $args  {
    885885     *     Arguments are listed here with an explanation of their defaults.
    886886     *     For more information about the arguments, see
    887887     *     {@link bp_core_fetch_avatar()}.
    888      *     @type string $alt Default: 'Profile picture of [user name]'.
    889      *     @type string $class Default: 'avatar'.
    890      *     @type string $type Default: 'thumb'.
    891      *     @type int|bool $width Default: false.
    892      *     @type int|bool $height Default: false.
    893      *     @type bool $id Currently unused.
    894      *     @type bool $no_grav Default: false.
     888     *     @type string   $alt    Default: 'Profile picture of [user name]'.
     889     *     @type string   $class  Default: 'avatar'.
     890     *     @type string   $type    Default: 'thumb'.
     891     *     @type int|bool $width   Default: false.
     892     *     @type int|bool $height  Default: false.
     893     *     @type bool     $id      Currently unused.
     894     *     @type bool     $no_grav Default: false.
    895895     * }
    896896     * @return string User avatar string.
     
    919919         *
    920920         * @param string $value Formatted HTML <img> element,
    921          *                      or raw avatar URL based on $html arg
     921         *                      or raw avatar URL based on $html arg.
    922922         */
    923923        return apply_filters( 'bp_get_member_avatar', bp_core_fetch_avatar( array( 'item_id' => $members_template->member->id, 'type' => $type, 'alt' => $alt, 'css_id' => $id, 'class' => $class, 'width' => $width, 'height' => $height, 'email' => $members_template->member->user_email ) ) );
     
    10321032     *     Array of optional arguments.
    10331033     *     @type mixed $active_format If true, formatted "active 5 minutes
    1034      *           ago". If false, formatted "5 minutes ago". If string, should
    1035      *           be sprintf'able like 'last seen %s ago'.
     1034     *                                ago". If false, formatted "5 minutes ago".
     1035     *                                If string, should be sprintf'able like
     1036     *                                'last seen %s ago'.
    10361037     * }
    10371038     * @return string
     
    10761077/**
    10771078 * Output the latest update of the current member in the loop.
     1079 *
     1080 * @param array|string $args
    10781081 */
    10791082function bp_member_latest_update( $args = '' ) {
     
    10831086     * Get the latest update from the current member in the loop.
    10841087     *
    1085      * @param array $args {
     1088     * @param array|string $args {
    10861089     *     Array of optional arguments.
    1087      *     @type int $length Truncation length. Default: 225.
     1090     *     @type int  $length    Truncation length. Default: 225.
    10881091     *     @type bool $view_link Whether to provide a 'View' link for
    1089      *           truncated entries. Default: false.
     1092     *                           truncated entries. Default: false.
    10901093     * }
    10911094     * @return string
     
    11391142 * @see bp_get_member_profile_data() for a description of params.
    11401143 *
    1141  * @param array $args See {@link bp_get_member_profile_data()}.
     1144 * @param array|string $args See {@link bp_get_member_profile_data()}.
    11421145 */
    11431146function bp_member_profile_data( $args = '' ) {
     
    11511154     * to use outside of the loop.
    11521155     *
    1153      * @param array $args {
     1156     * @param array|string $args {
    11541157     *     Array of config parameters.
    1155      *     @type string $field Name of the profile field.
    1156      *     @type int $user_id ID of the user whose data is being fetched.
    1157      *           Defaults to the current member in the loop, or if not
    1158      *           present, to the currently displayed user.
     1158     *     @type string $field   Name of the profile field.
     1159     *     @type int    $user_id ID of the user whose data is being fetched.
     1160     *                           Defaults to the current member in the loop, or if not
     1161     *                           present, to the currently displayed user.
    11591162     * }
    11601163     * @return string|bool Profile data if found, otherwise false.
     
    14131416 *
    14141417 * @see bp_get_loggedin_user_avatar() for a description of params.
     1418 *
     1419 * @param array|string $args
    14151420 */
    14161421function bp_loggedin_user_avatar( $args = '' ) {
     
    14231428     *      return values.
    14241429     *
    1425      * @param array $args  {
     1430     * @param array|string $args  {
    14261431     *     Arguments are listed here with an explanation of their defaults.
    14271432     *     For more information about the arguments, see
    14281433     *     {@link bp_core_fetch_avatar()}.
    1429      *     @type string $alt Default: 'Profile picture of [user name]'.
    1430      *     @type bool $html Default: true.
    1431      *     @type string $type Default: 'thumb'.
    1432      *     @type int|bool $width Default: false.
     1434     *     @type string   $alt    Default: 'Profile picture of [user name]'.
     1435     *     @type bool     $html  Default: true.
     1436     *     @type string   $type  Default: 'thumb'.
     1437     *     @type int|bool $width  Default: false.
    14331438     *     @type int|bool $height Default: false.
    14341439     * }
     
    14601465 *
    14611466 * @see bp_get_displayed_user_avatar() for a description of params.
     1467 *
     1468 * @param array|string $args
    14621469 */
    14631470function bp_displayed_user_avatar( $args = '' ) {
     
    14701477     *      return values.
    14711478     *
    1472      * @param array $args  {
     1479     * @param array|string $args  {
    14731480     *     Arguments are listed here with an explanation of their defaults.
    14741481     *     For more information about the arguments, see
    14751482     *     {@link bp_core_fetch_avatar()}.
    1476      *     @type string $alt Default: 'Profile picture of [user name]'.
    1477      *     @type bool $html Default: true.
    1478      *     @type string $type Default: 'thumb'.
    1479      *     @type int|bool $width Default: false.
     1483     *     @type string   $alt    Default: 'Profile picture of [user name]'.
     1484     *     @type bool     $html  Default: true.
     1485     *     @type string   $type  Default: 'thumb'.
     1486     *     @type int|bool $width  Default: false.
    14801487     *     @type int|bool $height Default: false.
    14811488     * }
     
    15551562     *
    15561563     * @param int $user_id ID of the user. Default: displayed user ID.
     1564     *
    15571565     * @return string
    15581566     */
     
    15851593     * Simply takes all the characters before the first space in a name.
    15861594     *
    1587      * @param string $name Full name to use when generating first name.
    1588      *        Defaults to displayed user's first name, or to logged-in
    1589      *        user's first name if it's unavailable.
     1595     * @param string|bool $name Full name to use when generating first name.
     1596     *                          Defaults to displayed user's first name, or to
     1597     *                          logged-in user's first name if it's unavailable.
    15901598     * @return string
    15911599     */
     
    21932201 * @see bp_get_signup_avatar() for description of arguments.
    21942202 *
    2195  * @param array $args See {@link bp_get_signup_avatar(}.
     2203 * @param array|string $args See {@link bp_get_signup_avatar(}.
    21962204 */
    21972205function bp_signup_avatar( $args = '' ) {
     
    22032211     * @see bp_core_fetch_avatar() for description of arguments.
    22042212     *
    2205      * @param array $args {
     2213     * @param array|string $args {
    22062214     *     Array of optional arguments.
    2207      *     @type int $size Height/weight in pixels. Default: value of
    2208      *           bp_core_avatar_full_width().
     2215     *     @type int    $size Height/weight in pixels. Default: value of
     2216     *                         bp_core_avatar_full_width().
    22092217     *     @type string $class CSS class. Default: 'avatar'.
    2210      *     @type string $alt HTML 'alt' attribute. Default: 'Your Avatar'.
     2218     *     @type string $alt   HTML 'alt' attribute. Default: 'Your Avatar'.
    22112219     * }
    22122220     * @return string
     
    23322340 * @see bp_get_members_component_link() for description of parameters.
    23332341 *
    2334  * @param string $component See {@bp_get_members_component_link()}.
    2335  * @param string $action See {@bp_get_members_component_link()}.
    2336  * @param string $query_args See {@bp_get_members_component_link()}.
    2337  * @param string $nonce See {@bp_get_members_component_link()}.
     2342 * @param string      $component See {@bp_get_members_component_link()}.
     2343 * @param string      $action See {@bp_get_members_component_link()}.
     2344 * @param string      $query_args See {@bp_get_members_component_link()}.
     2345 * @param string|bool $nonce See {@bp_get_members_component_link()}.
    23382346 */
    23392347function bp_members_component_link( $component, $action = '', $query_args = '', $nonce = false ) {
     
    23432351     * Generate a link to a members component subpage.
    23442352     *
    2345      * @param string $component ID of the component (eg 'friends').
    2346      * @param string $action Optional. 'action' slug (eg 'invites').
    2347      * @param array $query_args Optional. Array of URL params to add to the
    2348      *        URL. See {@link add_query_arg()} for format.
    2349      * @param array $nonce Optional. If provided, the URL will be passed
    2350      *        through wp_nonce_url() with $nonce as the action string.
     2353     * @param string       $component  ID of the component (eg 'friends').
     2354     * @param string       $action     Optional. 'action' slug (eg 'invites').
     2355     * @param array|string $query_args Optional. Array of URL params to add to the
     2356     *                                 URL. See {@link add_query_arg()} for format.
     2357     * @param array|bool   $nonce      Optional. If provided, the URL will be passed
     2358     *                                 through wp_nonce_url() with $nonce as the
     2359     *                                 action string.
    23512360     * @return string
    23522361     */
  • trunk/src/bp-members/bp-members-widgets.php

    r9819 r9877  
    11<?php
    22/**
    3  * BuddyPress Members Widgets
     3 * BuddyPress Members Widgets.
    44 *
    55 * @package BuddyPress
     
    3131
    3232    /**
    33      * Constructor method
     33     * Constructor method.
    3434     */
    3535    public function __construct() {
     
    153153     * Update the Members widget options.
    154154     *
    155      * @param  array $new_instance The new instance options.
    156      * @param  array $old_instance The old instance options.
     155     * @param array $new_instance The new instance options.
     156     * @param array $old_instance The old instance options.
     157     *
    157158     * @return array $instance     The parsed options to be saved.
    158159     */
     
    171172     * Output the Members widget options form.
    172173     *
    173      * @param $instance Settings for this widget.
     174     * @param array $instance Widget instance settings.
     175     *
     176     * @return string
    174177     */
    175178    public function form( $instance ) {
     
    221224     * @since BuddyPress (2.3.0)
    222225     *
    223      * @param $instance Instance
    224      * @uses bp_parse_args() To merge widget settings into defaults
     226     * @param array $instance Widget instance settings.
     227     *
     228     * @uses bp_parse_args() To merge widget settings into defaults.
     229     *
     230     * @return array
    225231     */
    226232    public function parse_settings( $instance = array() ) {
     
    321327     * Update the Who's Online widget options.
    322328     *
    323      * @param  array $new_instance The new instance options.
    324      * @param  array $old_instance The old instance options.
     329     * @param array $new_instance The new instance options.
     330     * @param array $old_instance The old instance options.
     331     *
    325332     * @return array $instance     The parsed options to be saved.
    326333     */
     
    336343     * Output the Who's Online widget options form.
    337344     *
    338      * @param $instance Settings for this widget.
     345     * @param array $instance Widget instance settings.
     346     *
     347     * @return string
    339348     */
    340349    public function form( $instance ) {
     
    367376     * @since BuddyPress (2.3.0)
    368377     *
    369      * @param $instance Instance
    370      * @uses bp_parse_args() To merge widget settings into defaults
     378     * @param array $instance Widget instance settings.
     379     *
     380     * @uses bp_parse_args() To merge widget settings into defaults.
     381     *
     382     * @return array
    371383     */
    372384    public function parse_settings( $instance = array() ) {
     
    467479     * @param array $new_instance The new instance options.
    468480     * @param array $old_instance The old instance options.
     481     *
    469482     * @return array $instance The parsed options to be saved.
    470483     */
     
    480493     * Output the Recently Active widget options form.
    481494     *
    482      * @param $instance Settings for this widget.
     495     * @param array $instance Widget instance settings.
     496     *
     497     * @return string
    483498     */
    484499    public function form( $instance ) {
     
    511526     * @since BuddyPress (2.3.0)
    512527     *
    513      * @param $instance Instance
    514      * @uses bp_parse_args() To merge widget settings into defaults
     528     * @param array $instance Widget instance settings.
     529     *
     530     * @uses bp_parse_args() To merge widget settings into defaults.
     531     *
     532     * @return array
    515533     */
    516534    public function parse_settings( $instance = array() ) {
  • trunk/src/bp-members/classes/class-bp-signup.php

    r9819 r9877  
    111111     * @since BuddyPress (2.0.0)
    112112     *
    113      * @param array $args the argument to retrieve desired signups
     113     * @param array $args the argument to retrieve desired signups.
     114     *
    114115     * @return array {
    115116     *     @type array $signups Located signups.
    116      *     @type int $total Total number of signups matching params.
     117     *     @type int   $total  Total number of signups matching params.
    117118     * }
    118119     */
     
    258259     *
    259260     * @param array $args
     261     *
    260262     * @return int|bool ID of newly created signup on success, false on
    261      *         failure.
     263     *                  failure.
    262264     */
    263265    public static function add( $args = array() ) {
     
    314316     * @since BuddyPress (2.0.0)
    315317     *
    316      * @param string $user_login User login string.
     318     * @param string $user_login    User login string.
    317319     * @param string $user_password User password.
    318      * @param string $user_email User email address.
    319      * @param array $usermeta Metadata associated with the signup.
     320     * @param string $user_email    User email address.
     321     * @param array  $usermeta      Metadata associated with the signup.
     322     *
    320323     * @return int User id.
    321324     */
     
    380383     *
    381384     * @param int $user_id ID of the user being checked.
     385     *
    382386     * @return int|bool The status if found, otherwise false.
    383387     */
     
    407411     *
    408412     * @param string $key Activation key.
     413     *
    409414     * @return bool True on success, false on failure.
    410415     */
     
    452457     * @since BuddyPress (2.0.0)
    453458     *
    454      * @return int the number of signups
     459     * @return int The number of signups.
    455460     */
    456461    public static function count_signups() {
     
    478483     * @since BuddyPress (2.0.0)
    479484     *
    480      * @param  array $args
    481      * @return int the signup id
     485     * @param array $args
     486     *
     487     * @return int The signup id
    482488     */
    483489    public static function update( $args = array() ) {
     
    533539     *
    534540     * @param array $signup_ids Single ID or list of IDs to resend.
     541     *
    535542     * @return array
    536543     */
     
    622629     *
    623630     * @param array $signup_ids Single ID or list of IDs to activate.
     631     *
    624632     * @return array
    625633     */
     
    704712     *
    705713     * @param array $signup_ids Single ID or list of IDs to delete.
     714     *
    706715     * @return array
    707716     */
Note: See TracChangeset for help on using the changeset viewer.