Changeset 9877 for trunk/src/bp-members/bp-members-template.php
- Timestamp:
- 05/19/2015 01:40:26 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-template.php
r9819 r9877 2 2 3 3 /** 4 * BuddyPress Member Template Tags 4 * BuddyPress Member Template Tags. 5 5 * 6 6 * Functions that are safe to use inside your template files and themes. … … 232 232 233 233 /** 234 * The unique string used for pagination queries 234 * The unique string used for pagination queries. 235 235 * 236 236 * @access public 237 * @var public237 * @var string 238 238 */ 239 239 public $pag_arg; … … 243 243 * 244 244 * @access public 245 * @var public245 * @var string 246 246 */ 247 247 public $pag_page; … … 251 251 * 252 252 * @access public 253 * @var public253 * @var string 254 254 */ 255 255 public $pag_num; … … 287 287 * @param array $meta_key Limit to users with a meta_key. 288 288 * @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. 290 290 * Default: 'upage'. 291 291 * @param array|string $member_type Array or comma-separated string of member types to limit results to. … … 467 467 * @global object $members_template {@link BP_Members_Template} 468 468 * 469 * @param array $args {469 * @param array|string $args { 470 470 * Arguments for limiting the contents of the members loop. Most arguments 471 471 * are in the same format as {@link BP_User_Query}. However, because … … 497 497 * @type string $search_terms Limit results by a search term. Default: null. 498 498 * @type string $meta_key Limit results by the presence of a usermeta key. 499 * Default: false.499 * Default: false. 500 500 * @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. 502 502 * @type bool $populate_extras Whether to fetch optional data, such as 503 * friend counts. Default: true.503 * friend counts. Default: true. 504 504 * } 505 505 * @return bool Returns true when blogs are found, otherwise false. … … 862 862 * @see bp_get_member_avatar() for description of arguments. 863 863 * 864 * @param array $args See {@link bp_get_member_avatar()}.864 * @param array|string $args See {@link bp_get_member_avatar()}. 865 865 */ 866 866 function bp_member_avatar( $args = '' ) { … … 872 872 * 873 873 * @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. 875 875 */ 876 876 echo apply_filters( 'bp_member_avatar', bp_get_member_avatar( $args ) ); … … 882 882 * return values. 883 883 * 884 * @param array $args {884 * @param array|string $args { 885 885 * Arguments are listed here with an explanation of their defaults. 886 886 * For more information about the arguments, see 887 887 * {@link bp_core_fetch_avatar()}. 888 * @type string $altDefault: 'Profile picture of [user name]'.889 * @type string $classDefault: 'avatar'.890 * @type string $typeDefault: 'thumb'.891 * @type int|bool $width Default: false.892 * @type int|bool $height Default: false.893 * @type bool $idCurrently 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. 895 895 * } 896 896 * @return string User avatar string. … … 919 919 * 920 920 * @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. 922 922 */ 923 923 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 ) ) ); … … 1032 1032 * Array of optional arguments. 1033 1033 * @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'. 1036 1037 * } 1037 1038 * @return string … … 1076 1077 /** 1077 1078 * Output the latest update of the current member in the loop. 1079 * 1080 * @param array|string $args 1078 1081 */ 1079 1082 function bp_member_latest_update( $args = '' ) { … … 1083 1086 * Get the latest update from the current member in the loop. 1084 1087 * 1085 * @param array $args {1088 * @param array|string $args { 1086 1089 * Array of optional arguments. 1087 * @type int $lengthTruncation length. Default: 225.1090 * @type int $length Truncation length. Default: 225. 1088 1091 * @type bool $view_link Whether to provide a 'View' link for 1089 * truncated entries. Default: false.1092 * truncated entries. Default: false. 1090 1093 * } 1091 1094 * @return string … … 1139 1142 * @see bp_get_member_profile_data() for a description of params. 1140 1143 * 1141 * @param array $args See {@link bp_get_member_profile_data()}.1144 * @param array|string $args See {@link bp_get_member_profile_data()}. 1142 1145 */ 1143 1146 function bp_member_profile_data( $args = '' ) { … … 1151 1154 * to use outside of the loop. 1152 1155 * 1153 * @param array $args {1156 * @param array|string $args { 1154 1157 * 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 not1158 * 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. 1159 1162 * } 1160 1163 * @return string|bool Profile data if found, otherwise false. … … 1413 1416 * 1414 1417 * @see bp_get_loggedin_user_avatar() for a description of params. 1418 * 1419 * @param array|string $args 1415 1420 */ 1416 1421 function bp_loggedin_user_avatar( $args = '' ) { … … 1423 1428 * return values. 1424 1429 * 1425 * @param array $args {1430 * @param array|string $args { 1426 1431 * Arguments are listed here with an explanation of their defaults. 1427 1432 * For more information about the arguments, see 1428 1433 * {@link bp_core_fetch_avatar()}. 1429 * @type string $altDefault: 'Profile picture of [user name]'.1430 * @type bool $htmlDefault: true.1431 * @type string $typeDefault: '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. 1433 1438 * @type int|bool $height Default: false. 1434 1439 * } … … 1460 1465 * 1461 1466 * @see bp_get_displayed_user_avatar() for a description of params. 1467 * 1468 * @param array|string $args 1462 1469 */ 1463 1470 function bp_displayed_user_avatar( $args = '' ) { … … 1470 1477 * return values. 1471 1478 * 1472 * @param array $args {1479 * @param array|string $args { 1473 1480 * Arguments are listed here with an explanation of their defaults. 1474 1481 * For more information about the arguments, see 1475 1482 * {@link bp_core_fetch_avatar()}. 1476 * @type string $altDefault: 'Profile picture of [user name]'.1477 * @type bool $htmlDefault: true.1478 * @type string $typeDefault: '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. 1480 1487 * @type int|bool $height Default: false. 1481 1488 * } … … 1555 1562 * 1556 1563 * @param int $user_id ID of the user. Default: displayed user ID. 1564 * 1557 1565 * @return string 1558 1566 */ … … 1585 1593 * Simply takes all the characters before the first space in a name. 1586 1594 * 1587 * @param string $name Full name to use when generating first name.1588 * Defaults to displayed user's first name, or to logged-in1589 * 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. 1590 1598 * @return string 1591 1599 */ … … 2193 2201 * @see bp_get_signup_avatar() for description of arguments. 2194 2202 * 2195 * @param array $args See {@link bp_get_signup_avatar(}.2203 * @param array|string $args See {@link bp_get_signup_avatar(}. 2196 2204 */ 2197 2205 function bp_signup_avatar( $args = '' ) { … … 2203 2211 * @see bp_core_fetch_avatar() for description of arguments. 2204 2212 * 2205 * @param array $args {2213 * @param array|string $args { 2206 2214 * Array of optional arguments. 2207 * @type int $sizeHeight/weight in pixels. Default: value of2208 * bp_core_avatar_full_width().2215 * @type int $size Height/weight in pixels. Default: value of 2216 * bp_core_avatar_full_width(). 2209 2217 * @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'. 2211 2219 * } 2212 2220 * @return string … … 2332 2340 * @see bp_get_members_component_link() for description of parameters. 2333 2341 * 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()}. 2338 2346 */ 2339 2347 function bp_members_component_link( $component, $action = '', $query_args = '', $nonce = false ) { … … 2343 2351 * Generate a link to a members component subpage. 2344 2352 * 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. 2351 2360 * @return string 2352 2361 */
Note: See TracChangeset
for help on using the changeset viewer.