Changeset 9833 for trunk/src/bp-activity/bp-activity-template.php
- Timestamp:
- 05/03/2015 06:51:25 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-template.php
r9828 r9833 227 227 * 'include'. Default values for 'per_page' and 'display_comments' 228 228 * differ from the originating function, and are described below. 229 * @type string $page_argThe string used as a query parameter in230 * pagination links. Default: 'acpage'.231 * @type array|bool $includePass an array of activity IDs to232 * retrieve only those items, or false to noop the 'include'233 * parameter. 'include' differs from 'in' in that 'in' forms234 * an IN clause that works in conjunction with other filters235 * passed to the function, while 'include' is interpreted as236 * an exact list of items to retrieve, which skips all other237 * filter-related parameters. Default: false.238 * @type int|bool $per_pageDefault: 20.229 * @type string $page_arg The string used as a query parameter in 230 * pagination links. Default: 'acpage'. 231 * @type array|bool $include Pass an array of activity IDs to 232 * retrieve only those items, or false to noop the 'include' 233 * parameter. 'include' differs from 'in' in that 'in' forms 234 * an IN clause that works in conjunction with other filters 235 * passed to the function, while 'include' is interpreted as 236 * an exact list of items to retrieve, which skips all other 237 * filter-related parameters. Default: false. 238 * @type int|bool $per_page Default: 20. 239 239 * @type string|bool $display_comments Default: 'threaded'. 240 240 * } … … 523 523 * @uses apply_filters() To call the 'bp_has_activities' hook. 524 524 * 525 * @param array $args {525 * @param array|string $args { 526 526 * Arguments for limiting the contents of the activity loop. Most arguments 527 527 * are in the same format as {@link BP_Activity_Activity::get()}. However, … … 1422 1422 * @uses bp_get_activity_avatar() 1423 1423 * 1424 * @param array $args See {@link bp_get_activity_avatar()} for description.1424 * @param array|string $args See {@link bp_get_activity_avatar()} for description. 1425 1425 */ 1426 1426 function bp_activity_avatar( $args = '' ) { … … 1441 1441 * @uses apply_filters() To call the 'bp_get_activity_avatar' hook 1442 1442 * 1443 * @param array $args {1443 * @param array|string $args { 1444 1444 * Arguments are listed here with an explanation of their defaults. 1445 1445 * For more information about the arguments, see 1446 1446 * {@link bp_core_fetch_avatar()}. 1447 * @type string $altDefault: 'Profile picture of [user name]' if1448 * activity user name is available, otherwise 'Profile picture'.1449 * @type string $classDefault: 'avatar'.1450 * @type string|bool $email Default: Email of the activity's1451 * associated user, if available. Otherwise false.1452 * @type string $typeDefault: 'full' when viewing a single activity1453 * permalink page, otherwise 'thumb'.1454 * @type int|bool $user_id Default: ID of the activity's user.1447 * @type string $alt Default: 'Profile picture of [user name]' if 1448 * activity user name is available, otherwise 'Profile picture'. 1449 * @type string $class Default: 'avatar'. 1450 * @type string|bool $email Default: Email of the activity's 1451 * associated user, if available. Otherwise false. 1452 * @type string $type Default: 'full' when viewing a single activity 1453 * permalink page, otherwise 'thumb'. 1454 * @type int|bool $user_id Default: ID of the activity's user. 1455 1455 * } 1456 1456 * @return string User avatar string. … … 1557 1557 * @uses bp_get_activity_secondary_avatar() 1558 1558 * 1559 * @param array $args See {@link bp_get_activity_secondary_avatar} for description.1559 * @param array|string $args See {@link bp_get_activity_secondary_avatar} for description. 1560 1560 */ 1561 1561 function bp_activity_secondary_avatar( $args = '' ) { … … 1579 1579 * @param array $args { 1580 1580 * For a complete description of arguments, see {@link bp_core_fetch_avatar()}. 1581 * @type string $altDefault value varies based on current activity1582 * item component.1583 * @type string $typeDefault: 'full' when viewing a single activity1584 * permalink page, otherwise 'thumb'.1585 * @type string $classDefault: 'avatar'.1586 * @type string|bool $email Default: email of the activity's user.1587 * @type int|bool $user_id Default: ID of the activity's user.1581 * @type string $alt Default value varies based on current activity 1582 * item component. 1583 * @type string $type Default: 'full' when viewing a single activity 1584 * permalink page, otherwise 'thumb'. 1585 * @type string $class Default: 'avatar'. 1586 * @type string|bool $email Default: email of the activity's user. 1587 * @type int|bool $user_id Default: ID of the activity's user. 1588 1588 * } 1589 1589 * @return string The secondary avatar … … 1715 1715 * @since BuddyPress (1.7.0) 1716 1716 * 1717 * @param string $link Link to wrap the avatar image in.1717 * @param string $link Link to wrap the avatar image in. 1718 1718 * @param string $component Activity component being acted on. 1719 1719 */ … … 1725 1725 * @since BuddyPress (1.2.10) 1726 1726 * 1727 * @param string Formatted HTML <img> element, or raw avatar URL.1727 * @param string $avatar Formatted HTML <img> element, or raw avatar URL. 1728 1728 */ 1729 1729 $avatar = apply_filters( 'bp_get_activity_secondary_avatar', $avatar ); … … 1766 1766 * @type bool $no_timestamp Whether to exclude the timestamp. 1767 1767 * } 1768 * 1768 1769 * @return string The activity action. 1769 1770 */ … … 1924 1925 * 1925 1926 * @param string $content The activity content. 1927 * 1926 1928 * @return string The activity content with the metadata string attached. 1927 1929 */ … … 1992 1994 * @uses apply_filters() To call the 'bp_activity_user_can_delete' hook 1993 1995 * 1994 * @param object $activity Optional. Falls back on the current item in the loop. 1996 * @param object|bool $activity Optional. Falls back on the current item in the loop. 1997 * 1995 1998 * @return bool True if can delete, false otherwise. 1996 1999 */ … … 2038 2041 * 2039 2042 * @param bool $can_delete Whether the user can delete the item. 2040 * @param object $activity Current activity item object.2043 * @param object $activity Current activity item object. 2041 2044 */ 2042 2045 return (bool) apply_filters( 'bp_activity_user_can_delete', $can_delete, $activity ); … … 2051 2054 * @uses bp_get_activity_parent_content() 2052 2055 * 2053 * @param array $args See {@link bp_get_activity_parent_content} for description.2056 * @param array|string $args See {@link bp_get_activity_parent_content} for description. 2054 2057 */ 2055 2058 function bp_activity_parent_content( $args = '' ) { … … 2131 2134 * 2132 2135 * @return bool|int False if parent activity can't be found, otherwise 2133 * the parent activity's user ID.2136 * the parent activity's user ID. 2134 2137 */ 2135 2138 function bp_get_activity_parent_user_id() { … … 2207 2210 * @todo deprecate $args param 2208 2211 * 2209 * @param array $args See {@link bp_activity_get_comments} for description.2212 * @param array|string $args See {@link bp_activity_get_comments} for description. 2210 2213 */ 2211 2214 function bp_activity_comments( $args = '' ) { … … 2227 2230 * @global object $activities_template {@link BP_Activity_Template} 2228 2231 * @uses bp_activity_recurse_comments() 2232 * 2233 * @return bool 2229 2234 */ 2230 2235 function bp_activity_get_comments( $args = '' ) { … … 2250 2255 * @global object $activities_template {@link BP_Activity_Template} 2251 2256 * @uses locate_template() 2257 * 2258 * @return bool|string 2252 2259 */ 2253 2260 function bp_activity_recurse_comments( $comment ) { … … 2309 2316 * 2310 2317 * @return object|bool $current_comment The activity comment currently being 2311 * displayed. False on failure.2318 * displayed. False on failure. 2312 2319 */ 2313 2320 function bp_activity_current_comment() { … … 2348 2355 * @uses apply_filters() To call the 'bp_activity_comment_id' hook. 2349 2356 * 2350 * @return int|bool $comment_id The ID of the activity comment 2351 * currentlybeing displayed, false if none is found.2357 * @return int|bool $comment_id The ID of the activity comment currently 2358 * being displayed, false if none is found. 2352 2359 */ 2353 2360 function bp_get_activity_comment_id() { … … 2386 2393 * 2387 2394 * @return int|bool $user_id The user_id of the author of the displayed 2388 * activity comment. False on failure.2395 * activity comment. False on failure. 2389 2396 */ 2390 2397 function bp_get_activity_comment_user_id() { … … 2503 2510 * 2504 2511 * @return string|bool $date_recorded Time since the activity was recorded, 2505 * in the form "%s ago". False on failure.2512 * in the form "%s ago". False on failure. 2506 2513 */ 2507 2514 function bp_get_activity_comment_date_recorded() { … … 2576 2583 * 2577 2584 * @return string $link The nonced URL for deleting the current 2578 * activity comment.2585 * activity comment. 2579 2586 */ 2580 2587 function bp_get_activity_comment_delete_link() { … … 2693 2700 * 2694 2701 * @param object $comment Activity comment object. 2695 * @param int $count The current iteration count.2702 * @param int $count The current iteration count. 2696 2703 * 2697 2704 * @return int $count The activity comment count. … … 2716 2723 * 2717 2724 * @param int $new_count New total count for the current comment. 2718 * @param object $comment Activity comment object.2719 * @param int $count Current iteration count for the current comment.2725 * @param object $comment Activity comment object. 2726 * @param int $count Current iteration count for the current comment. 2720 2727 */ 2721 2728 return apply_filters( 'bp_activity_recurse_comment_count', $new_count, $comment, $count ); … … 2803 2810 * 2804 2811 * @return string|bool The activity comment form no JavaScript 2805 * display CSS. False on failure.2812 * display CSS. False on failure. 2806 2813 */ 2807 2814 function bp_get_activity_comment_form_nojs_display() { … … 2958 2965 * @since BuddyPress (1.8.0) 2959 2966 * 2960 * @param string $link Activity comment permalink.2967 * @param string $link Activity comment permalink. 2961 2968 * @param int $comment_id ID for the current activity comment. 2962 2969 */ … … 3127 3134 * 3128 3135 * @return string $link Activity delete link. Contains $redirect_to arg 3129 * if on single activity page.3136 * if on single activity page. 3130 3137 */ 3131 3138 function bp_get_activity_delete_link() { … … 3177 3184 * 3178 3185 * @return string $link Activity delete link. Contains $redirect_to arg 3179 * if on single activity page.3186 * if on single activity page. 3180 3187 */ 3181 3188 function bp_get_activity_delete_url() { … … 3230 3237 * 3231 3238 * @param int $user_id If empty, will fall back on displayed user. 3239 * 3232 3240 * @return string|bool $latest_update The activity latest update link. 3233 * False on failure3241 * False on failure 3234 3242 */ 3235 3243 function bp_get_activity_latest_update( $user_id = 0 ) { … … 3281 3289 * @uses bp_get_activity_filter_links() 3282 3290 * 3283 * @param array $args See {@link bp_get_activity_filter_links()} for description.3291 * @param array|bool $args See {@link bp_get_activity_filter_links()} for description. 3284 3292 */ 3285 3293 function bp_activity_filter_links( $args = false ) { … … 3300 3308 * @uses apply_filters() To call the 'bp_get_activity_filter_links' hook. 3301 3309 * 3302 * @param array $args {3310 * @param array|bool $args { 3303 3311 * @type string $style The type of markup to use for the links. 3304 * 'list', 'paragraph', or 'span'. Default: 'list'.3312 * 'list', 'paragraph', or 'span'. Default: 'list'. 3305 3313 * } 3306 3314 * @return string|bool $component_links The activity filter links. … … 3364 3372 * @since BuddyPress (1.1.0) 3365 3373 * 3366 * @param string $link The URL for the current component.3374 * @param string $link The URL for the current component. 3367 3375 * @param string $component The current component getting links constructed for. 3368 3376 */ … … 3441 3449 * @since BuddyPress (1.5.0) 3442 3450 * 3443 * @param bool $can_comment Status on if activity can be commented on.3451 * @param bool $can_comment Status on if activity can be commented on. 3444 3452 * @param string $activity_action Current activity action being checked on. 3445 3453 */ … … 3489 3497 * 3490 3498 * @param bool $can_comment Status on if activity reply can be commented on. 3491 * @param string $comment Current comment being checked on.3499 * @param string $comment Current comment being checked on. 3492 3500 */ 3493 3501 return (bool) apply_filters( 'bp_activity_can_comment_reply', $can_comment, $comment ); … … 3540 3548 * 3541 3549 * @param int $user_id ID of user being queried. Default: displayed user ID. 3550 * 3542 3551 * @return int The total favorite count for the specified user. 3543 3552 */ … … 3591 3600 * 3592 3601 * @param int $user_id ID of user being queried. Default: displayed user ID. 3602 * 3593 3603 * @return int The total mention count for the specified user. 3594 3604 */ … … 3668 3678 * @param array $activity Array of activities generated from {@link bp_activity_get()}. 3669 3679 * @param array $activity_ids Used for recursion purposes in this function. 3680 * 3670 3681 * @return array 3671 3682 */ … … 3696 3707 * @uses bp_get_mentioned_user_display_name() 3697 3708 * 3698 * @param int|string $user_id_or_username See {@link bp_get_mentioned_user_display_name()}.3709 * @param int|string|bool $user_id_or_username See {@link bp_get_mentioned_user_display_name()}. 3699 3710 */ 3700 3711 function bp_mentioned_user_display_name( $user_id_or_username = false ) { … … 3710 3721 * @uses apply_filters() To call the 'bp_get_mentioned_user_display_name' hook. 3711 3722 * 3712 * @param int|string User ID or username. 3723 * @param int|string|bool User ID or username. 3724 * 3713 3725 * @return string The mentioned user's display name. 3714 3726 */ … … 3728 3740 * @since BuddyPress (1.2.0) 3729 3741 * 3730 * @param string $name Display name for the mentioned user.3742 * @param string $name Display name for the mentioned user. 3731 3743 * @param int|string $user_id_or_username User ID or username use for query. 3732 3744 */ … … 3742 3754 * @uses bp_get_send_public_message_button() 3743 3755 * 3744 * @param array $args See {@link bp_get_send_public_message_button()}.3756 * @param array|string $args See {@link bp_get_send_public_message_button()}. 3745 3757 */ 3746 3758 function bp_send_public_message_button( $args = '' ) { … … 3758 3770 * @uses apply_filters() To call the 'bp_get_send_public_message_button' hook. 3759 3771 * 3760 * @param array $args {3772 * @param array|string $args { 3761 3773 * All arguments are optional. See {@link BP_Button} for complete 3762 3774 * descriptions. 3763 * @type string $id Default: 'public_message'.3764 * @type string $component Default: 'activity'.3765 * @type bool $must_be_logged_in Default: true.3766 * @type bool $block_selfDefault: true.3767 * @type string $wrapper_id Default: 'post-mention'.3768 * @type string $link_href Default: the public message link for3769 * the current member in the loop.3770 * @type string $link_title Default: 'Send a public message on your3771 * activity stream.'.3772 * @type string $link_text Default: 'Public Message'.3773 * @type string $link_class Default: 'activity-button mention'.3775 * @type string $id Default: 'public_message'. 3776 * @type string $component Default: 'activity'. 3777 * @type bool $must_be_logged_in Default: true. 3778 * @type bool $block_self Default: true. 3779 * @type string $wrapper_id Default: 'post-mention'. 3780 * @type string $link_href Default: the public message link for 3781 * the current member in the loop. 3782 * @type string $link_title Default: 'Send a public message on your 3783 * activity stream.'. 3784 * @type string $link_text Default: 'Public Message'. 3785 * @type string $link_class Default: 'activity-button mention'. 3774 3786 * } 3775 3787 * @return string The button for sending a public message. … … 3899 3911 * 3900 3912 * @param string $retval HTML markup for the list of avatars. 3901 * @param array $r Array of arguments used for each avatar.3913 * @param array $r Array of arguments used for each avatar. 3902 3914 * @param array $output Array of each avatar found, before imploded into single string. 3903 3915 */ … … 3935 3947 * 3936 3948 * @param array $comments Array of {@link BP_Activity_Activity} items. 3949 * 3937 3950 * @return array Array of user IDs. 3938 3951 */ … … 4005 4018 * @since BuddyPress (1.7.0) 4006 4019 * 4007 * @param string $output Optional. Either 'select' or 'checkbox'. Default: 'select'.4008 * @param array $args {4020 * @param string $output Optional. Either 'select' or 'checkbox'. Default: 'select'. 4021 * @param array|string $args { 4009 4022 * Optional extra arguments. 4010 * @type string $checkbox_name When returning checkboxes, sets the 'name'4011 * attribute.4012 * @type array|string $selected A list of types that should be checked/4013 * selected.4023 * @type string $checkbox_name When returning checkboxes, sets the 'name' 4024 * attribute. 4025 * @type array|string $selected A list of types that should be checked/ 4026 * selected. 4014 4027 * } 4015 4028 */ … … 4049 4062 * @since BuddyPress (1.7.0) 4050 4063 * 4051 * @param array $args Array of arguments passed into function.4052 * @param string $type Activity type being rendered in the output.4064 * @param array $args Array of arguments passed into function. 4065 * @param string $type Activity type being rendered in the output. 4053 4066 * @param string $description Description of the activity type being rendered. 4054 4067 */ … … 4425 4438 * 4426 4439 * @param string $context The current context. 'activity', 'member', 4427 * 'member_groups', 'group'.4440 * 'member_groups', 'group'. 4428 4441 * @uses bp_get_activity_show_filters() 4429 4442 */ … … 4437 4450 * 4438 4451 * @param string $context The current context. 'activity', 'member', 4439 * 'member_groups', 'group' 4452 * 'member_groups', 'group' 4453 * 4440 4454 * @return string HTML for <option> values. 4441 4455 */ … … 4487 4501 * @since BuddyPress (2.2.0) 4488 4502 * 4489 * @param array $filters Array of filter options for the given context, in the following format: $option_value => $option_name.4503 * @param array $filters Array of filter options for the given context, in the following format: $option_value => $option_name. 4490 4504 * @param string $context Context for the filter. 'activity', 'member', 'member_groups', 'group'. 4491 4505 */ … … 4506 4520 * @since BuddyPress (2.1.0) 4507 4521 * 4508 * @param string $output HTML output for the activity filter dropdown.4522 * @param string $output HTML output for the activity filter dropdown. 4509 4523 * @param array $filters Array of filter options for the given context, in the following format: $option_value => $option_name. 4510 4524 * @param string $context Context for the filter. 'activity', 'member', 'member_groups', 'group'.
Note: See TracChangeset
for help on using the changeset viewer.