Changeset 9136 for trunk/src/bp-activity/bp-activity-template.php
- Timestamp:
- 11/11/2014 09:17:53 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-template.php
r9133 r9136 14 14 * Output the activity component slug. 15 15 * 16 * @since BuddyPress (1.5 )16 * @since BuddyPress (1.5.0) 17 17 * 18 18 * @uses bp_get_activity_slug() … … 24 24 * Return the activity component slug. 25 25 * 26 * @since BuddyPress (1.5 )26 * @since BuddyPress (1.5.0) 27 27 * 28 28 * @uses apply_filters() To call the 'bp_get_activity_slug' hook. … … 31 31 */ 32 32 function bp_get_activity_slug() { 33 34 /** 35 * Filters the activity component slug. 36 * 37 * @since BuddyPress (1.5.0) 38 * 39 * @param string $slug Activity component slug. 40 */ 33 41 return apply_filters( 'bp_get_activity_slug', buddypress()->activity->slug ); 34 42 } … … 37 45 * Output the activity component root slug. 38 46 * 39 * @since BuddyPress (1.5 )47 * @since BuddyPress (1.5.0) 40 48 * 41 49 * @uses bp_get_activity_root_slug() … … 47 55 * Return the activity component root slug. 48 56 * 49 * @since BuddyPress (1.5 )57 * @since BuddyPress (1.5.0) 50 58 * 51 59 * @uses apply_filters() To call the 'bp_get_activity_root_slug' hook. … … 54 62 */ 55 63 function bp_get_activity_root_slug() { 64 65 /** 66 * Filters the activity component root slug. 67 * 68 * @since BuddyPress (1.5.0) 69 * 70 * @param string $root_slug Activity component root slug. 71 */ 56 72 return apply_filters( 'bp_get_activity_root_slug', buddypress()->activity->root_slug ); 57 73 } … … 60 76 * Output activity directory permalink. 61 77 * 62 * @since BuddyPress (1.5 )78 * @since BuddyPress (1.5.0) 63 79 * 64 80 * @uses bp_get_activity_directory_permalink() … … 70 86 * Return activity directory permalink 71 87 * 72 * @since BuddyPress (1.5 )88 * @since BuddyPress (1.5.0) 73 89 * 74 90 * @uses traisingslashit() … … 80 96 */ 81 97 function bp_get_activity_directory_permalink() { 98 99 /** 100 * Filters the activity directory permalink. 101 * 102 * @since BuddyPress (1.5.0) 103 * 104 * @param string $url Permalink url for the activity directory. 105 */ 82 106 return apply_filters( 'bp_get_activity_directory_permalink', trailingslashit( bp_get_root_domain() . '/' . bp_get_activity_root_slug() ) ); 83 107 } … … 88 112 * This is responsible for loading a group of activity items and displaying them. 89 113 * 90 * @since BuddyPress (1.0 )114 * @since BuddyPress (1.0.0) 91 115 */ 92 116 class BP_Activity_Template { … … 341 365 return true; 342 366 } elseif ( $this->current_activity + 1 == $this->activity_count ) { 343 do_action('activity_loop_end'); 367 368 /** 369 * Fires right before the rewinding of activity posts. 370 * 371 * @since BuddyPress (1.1.0) 372 */ 373 do_action( 'activity_loop_end' ); 344 374 // Do some cleaning up after the loop 345 375 $this->rewind_activities(); … … 367 397 $this->activity = (object) $this->activity; 368 398 369 if ( $this->current_activity == 0 ) // loop has just started 399 if ( $this->current_activity == 0 ) { // loop has just started 400 401 /** 402 * Fires if the current activity item is the first in the activity loop. 403 */ 370 404 do_action('activity_loop_start'); 405 } 371 406 } 372 407 } … … 379 414 * template functions to display a list of activity items. 380 415 * 381 * @since BuddyPress (1.0 )416 * @since BuddyPress (1.0.0) 382 417 * 383 418 * @global object $activities_template {@link BP_Activity_Template} … … 658 693 $per_page = $max; 659 694 660 // Support for basic filters in earlier BP versions is disabled by default. To enable, put 661 // add_filter( 'bp_activity_enable_afilter_support', '__return_true' ); 662 // into bp-custom.php or your theme's functions.php 695 /** 696 * Filters whether BuddyPress should enable afilter support. 697 * 698 * Support for basic filters in earlier BP versions is disabled by default. 699 * To enable, put add_filter( 'bp_activity_enable_afilter_support', '__return_true' ); 700 * into bp-custom.php or your theme's functions.php. 701 * 702 * @since BuddyPress (1.6.0) 703 * 704 * @param bool $value True if BuddyPress should enable afilter support. 705 */ 663 706 if ( isset( $_GET['afilter'] ) && apply_filters( 'bp_activity_enable_afilter_support', false ) ) 664 707 $filter = array( 'object' => $_GET['afilter'] ); … … 693 736 $activities_template = new BP_Activity_Template( $template_args ); 694 737 738 /** 739 * Filters whether or not there are activity items to display. 740 * 741 * @since BuddyPress (1.1.0) 742 * 743 * @param bool $has_activities Whether or not there are activity items to display. 744 * @param string $activities_template Current activities template being used. 745 * @param array $template_args Array of arguments passed into the BP_Activity_Template class. 746 */ 695 747 return apply_filters( 'bp_has_activities', $activities_template->has_activities(), $activities_template, $template_args ); 696 748 } … … 699 751 * Determine if there are still activities left in the loop. 700 752 * 701 * @since BuddyPress (1.0 )753 * @since BuddyPress (1.0.0) 702 754 * 703 755 * @global object $activities_template {@link BP_Activity_Template} … … 714 766 * Get the current activity object in the loop. 715 767 * 716 * @since BuddyPress (1.0 )768 * @since BuddyPress (1.0.0) 717 769 * 718 770 * @global object $activities_template {@link BP_Activity_Template} … … 740 792 $link = add_query_arg( $activities_template->pag_arg, $activities_template->pag_page + 1, $link ); 741 793 794 /** 795 * Filters the Load More link URL. 796 * 797 * @since BuddyPress (2.1.0) 798 * 799 * @param string $link The Load More link URL. 800 */ 742 801 return apply_filters( 'bp_get_activity_load_more_link', $link ); 743 802 } … … 746 805 * Output the activity pagination count. 747 806 * 748 * @since BuddyPress (1.0 )807 * @since BuddyPress (1.0.0) 749 808 * 750 809 * @global object $activities_template {@link BP_Activity_Template} … … 758 817 * Return the activity pagination count. 759 818 * 760 * @since BuddyPress (1.2 )819 * @since BuddyPress (1.2.0) 761 820 * 762 821 * @global object $activities_template {@link BP_Activity_Template} … … 779 838 * Output the activity pagination links. 780 839 * 781 * @since BuddyPress (1.0 )840 * @since BuddyPress (1.0.0) 782 841 * 783 842 * @uses bp_get_activity_pagination_links() … … 790 849 * Return the activity pagination links. 791 850 * 792 * @since BuddyPress (1.0 )851 * @since BuddyPress (1.0.0) 793 852 * 794 853 * @global object $activities_template {@link BP_Activity_Template} … … 800 859 global $activities_template; 801 860 861 /** 862 * Filters the activity pagination link output. 863 * 864 * @since BuddyPress (1.0.0) 865 * 866 * @param string $pag_links Output for the activity pagination links. 867 */ 802 868 return apply_filters( 'bp_get_activity_pagination_links', $activities_template->pag_links ); 803 869 } … … 806 872 * Return true when there are more activity items to be shown than currently appear. 807 873 * 808 * @since BuddyPress (1.5 )874 * @since BuddyPress (1.5.0) 809 875 * 810 876 * @global object $activities_template {@link BP_Activity_Template} … … 828 894 } 829 895 896 /** 897 * Filters whether there are more activity items to display. 898 * 899 * @since BuddyPress (1.5.0) 900 * 901 * @param bool $has_more_items Whether or not there are more activity items to display. 902 */ 830 903 return apply_filters( 'bp_activity_has_more_items', $has_more_items ); 831 904 } … … 834 907 * Output the activity count. 835 908 * 836 * @since BuddyPress (1.2 )909 * @since BuddyPress (1.2.0) 837 910 * 838 911 * @uses bp_get_activity_count() … … 845 918 * Return the activity count. 846 919 * 847 * @since BuddyPress (1.2 )920 * @since BuddyPress (1.2.0) 848 921 * 849 922 * @global object $activities_template {@link BP_Activity_Template} … … 855 928 global $activities_template; 856 929 930 /** 931 * Filters the activity count for the activity template. 932 * 933 * @since BuddyPress (1.2.0) 934 * 935 * @param int $activity_count The count for total activity. 936 */ 857 937 return apply_filters( 'bp_get_activity_count', (int) $activities_template->activity_count ); 858 938 } … … 861 941 * Output the number of activities per page. 862 942 * 863 * @since BuddyPress (1.2 )943 * @since BuddyPress (1.2.0) 864 944 * 865 945 * @uses bp_get_activity_per_page() … … 872 952 * Return the number of activities per page. 873 953 * 874 * @since BuddyPress (1.2 )954 * @since BuddyPress (1.2.0) 875 955 * 876 956 * @global object $activities_template {@link BP_Activity_Template} … … 882 962 global $activities_template; 883 963 964 /** 965 * Filters the activity posts per page value. 966 * 967 * @since BuddyPress (1.2.0) 968 * 969 * @param int $pag_num How many post should be displayed for pagination. 970 */ 884 971 return apply_filters( 'bp_get_activity_per_page', (int) $activities_template->pag_num ); 885 972 } … … 888 975 * Output the activities title. 889 976 * 890 * @since BuddyPress (1.0 )977 * @since BuddyPress (1.0.0) 891 978 * 892 979 * @uses bp_get_activities_title() … … 900 987 * Return the activities title. 901 988 * 902 * @since BuddyPress (1.0 )989 * @since BuddyPress (1.0.0) 903 990 * 904 991 * @global string $bp_activity_title … … 906 993 * @todo Deprecate. 907 994 * 908 * @return intThe activities title.995 * @return string The activities title. 909 996 */ 910 997 function bp_get_activities_title() { 911 998 global $bp_activity_title; 912 999 1000 /** 1001 * Filters the activities title for the activity template. 1002 * 1003 * @since BuddyPress (1.0.0) 1004 * 1005 * @param string $bp_activity_title The title to be displayed. 1006 */ 913 1007 return apply_filters( 'bp_get_activities_title', $bp_activity_title ); 914 1008 } … … 917 1011 * {@internal Missing Description} 918 1012 * 919 * @since BuddyPress (1.0 )1013 * @since BuddyPress (1.0.0) 920 1014 * 921 1015 * @uses bp_get_activities_no_activity() … … 929 1023 * {@internal Missing Description} 930 1024 * 931 * @since BuddyPress (1.0 )1025 * @since BuddyPress (1.0.0) 932 1026 * 933 1027 * @global string $bp_activity_no_activity … … 940 1034 global $bp_activity_no_activity; 941 1035 1036 /** 1037 * Filters the text used when there is no activity to display. 1038 * 1039 * @since BuddyPress (1.0.0) 1040 * 1041 * @param string $bp_activity_no_activity Text to display for no activity. 1042 */ 942 1043 return apply_filters( 'bp_get_activities_no_activity', $bp_activity_no_activity ); 943 1044 } … … 946 1047 * Output the activity ID. 947 1048 * 948 * @since BuddyPress (1.2 )1049 * @since BuddyPress (1.2.0) 949 1050 * 950 1051 * @uses bp_get_activity_id() … … 957 1058 * Return the activity ID. 958 1059 * 959 * @since BuddyPress (1.2 )1060 * @since BuddyPress (1.2.0) 960 1061 * 961 1062 * @global object $activities_template {@link BP_Activity_Template} … … 966 1067 function bp_get_activity_id() { 967 1068 global $activities_template; 1069 1070 /** 1071 * Filters the activity ID being displayed. 1072 * 1073 * @since BuddyPress (1.2.0) 1074 * 1075 * @param int $id The activity ID. 1076 */ 968 1077 return apply_filters( 'bp_get_activity_id', $activities_template->activity->id ); 969 1078 } … … 972 1081 * Output the activity item ID. 973 1082 * 974 * @since BuddyPress (1.2 )1083 * @since BuddyPress (1.2.0) 975 1084 * 976 1085 * @uses bp_get_activity_item_id() … … 983 1092 * Return the activity item ID. 984 1093 * 985 * @since BuddyPress (1.2 )1094 * @since BuddyPress (1.2.0) 986 1095 * 987 1096 * @global object $activities_template {@link BP_Activity_Template} … … 992 1101 function bp_get_activity_item_id() { 993 1102 global $activities_template; 1103 1104 /** 1105 * Filters the activity item ID being displayed. 1106 * 1107 * @since BuddyPress (1.2.0) 1108 * 1109 * @param int $item_id The activity item ID. 1110 */ 994 1111 return apply_filters( 'bp_get_activity_item_id', $activities_template->activity->item_id ); 995 1112 } … … 998 1115 * Output the activity secondary item ID. 999 1116 * 1000 * @since BuddyPress (1.2 )1117 * @since BuddyPress (1.2.0) 1001 1118 * 1002 1119 * @uses bp_get_activity_secondary_item_id() … … 1009 1126 * Return the activity secondary item ID. 1010 1127 * 1011 * @since BuddyPress (1.2 )1128 * @since BuddyPress (1.2.0) 1012 1129 * 1013 1130 * @global object $activities_template {@link BP_Activity_Template} … … 1018 1135 function bp_get_activity_secondary_item_id() { 1019 1136 global $activities_template; 1137 1138 /** 1139 * Filters the activity secondary item ID being displayed. 1140 * 1141 * @since BuddyPress (1.2.0) 1142 * 1143 * @param int $secondary_item_id The activity secondary item ID. 1144 */ 1020 1145 return apply_filters( 'bp_get_activity_secondary_item_id', $activities_template->activity->secondary_item_id ); 1021 1146 } … … 1024 1149 * Output the date the activity was recorded. 1025 1150 * 1026 * @since BuddyPress (1.2 )1151 * @since BuddyPress (1.2.0) 1027 1152 * 1028 1153 * @uses bp_get_activity_date_recorded() … … 1035 1160 * Return the date the activity was recorded. 1036 1161 * 1037 * @since BuddyPress (1.2 )1162 * @since BuddyPress (1.2.0) 1038 1163 * 1039 1164 * @global object $activities_template {@link BP_Activity_Template} … … 1044 1169 function bp_get_activity_date_recorded() { 1045 1170 global $activities_template; 1171 1172 /** 1173 * Filters the date the activity was recorded. 1174 * 1175 * @since BuddyPress (1.2.0) 1176 * 1177 * @param int $date_recorded The activity's date. 1178 */ 1046 1179 return apply_filters( 'bp_get_activity_date_recorded', $activities_template->activity->date_recorded ); 1047 1180 } … … 1075 1208 : ''; 1076 1209 1210 /** 1211 * Filters the display name of the member who posted the activity. 1212 * 1213 * @since BuddyPress (2.1.0) 1214 * 1215 * @param int $retval Display name for the member who posted. 1216 */ 1077 1217 return apply_filters( 'bp_get_activity_member_display_name', $retval ); 1078 1218 } … … 1081 1221 * Output the activity object name. 1082 1222 * 1083 * @since BuddyPress (1.2 )1223 * @since BuddyPress (1.2.0) 1084 1224 * 1085 1225 * @uses bp_get_activity_object_name() … … 1092 1232 * Return the activity object name. 1093 1233 * 1094 * @since BuddyPress (1.2 )1234 * @since BuddyPress (1.2.0) 1095 1235 * 1096 1236 * @global object $activities_template {@link BP_Activity_Template} … … 1101 1241 function bp_get_activity_object_name() { 1102 1242 global $activities_template; 1243 1244 /** 1245 * Filters the activity object name. 1246 * 1247 * @since BuddyPress (1.2.0) 1248 * 1249 * @param string $activity_component The activity object name. 1250 */ 1103 1251 return apply_filters( 'bp_get_activity_object_name', $activities_template->activity->component ); 1104 1252 } … … 1107 1255 * Output the activity type. 1108 1256 * 1109 * @since BuddyPress (1.2 )1257 * @since BuddyPress (1.2.0) 1110 1258 * 1111 1259 * @uses bp_get_activity_type() … … 1118 1266 * Return the activity type. 1119 1267 * 1120 * @since BuddyPress (1.2 )1268 * @since BuddyPress (1.2.0) 1121 1269 * 1122 1270 * @global object $activities_template {@link BP_Activity_Template} … … 1127 1275 function bp_get_activity_type() { 1128 1276 global $activities_template; 1277 1278 /** 1279 * Filters the activity type. 1280 * 1281 * @since BuddyPress (1.2.0) 1282 * 1283 * @param string $activity_type The activity type. 1284 */ 1129 1285 return apply_filters( 'bp_get_activity_type', $activities_template->activity->type ); 1130 1286 } … … 1135 1291 * Just a wrapper for bp_activity_type(). 1136 1292 * 1137 * @since BuddyPress (1.2 )1138 * @deprecated BuddyPress (1.5 )1293 * @since BuddyPress (1.2.0) 1294 * @deprecated BuddyPress (1.5.0) 1139 1295 * 1140 1296 * @todo Properly deprecate in favor of bp_activity_type() and … … 1150 1306 * Just a wrapper for bp_get_activity_type(). 1151 1307 * 1152 * @since BuddyPress (1.2 )1153 * @deprecated BuddyPress (1.5 )1308 * @since BuddyPress (1.2.0) 1309 * @deprecated BuddyPress (1.5.0) 1154 1310 * 1155 1311 * @todo Properly deprecate in favor of bp_get_activity_type(). … … 1164 1320 * Output the activity user ID. 1165 1321 * 1166 * @since BuddyPress (1.1 )1322 * @since BuddyPress (1.1.0) 1167 1323 * 1168 1324 * @uses bp_get_activity_user_id() … … 1175 1331 * Return the activity user ID. 1176 1332 * 1177 * @since BuddyPress (1.1 )1333 * @since BuddyPress (1.1.0) 1178 1334 * 1179 1335 * @global object $activities_template {@link BP_Activity_Template} … … 1184 1340 function bp_get_activity_user_id() { 1185 1341 global $activities_template; 1342 1343 /** 1344 * Filters the activity user ID. 1345 * 1346 * @since BuddyPress (1.1.0) 1347 * 1348 * @param int $user_id The activity user ID. 1349 */ 1186 1350 return apply_filters( 'bp_get_activity_user_id', $activities_template->activity->user_id ); 1187 1351 } … … 1190 1354 * Output the activity user link. 1191 1355 * 1192 * @since BuddyPress (1.2 )1356 * @since BuddyPress (1.2.0) 1193 1357 * 1194 1358 * @uses bp_get_activity_user_link() … … 1201 1365 * Return the activity user link. 1202 1366 * 1203 * @since BuddyPress (1.2 )1367 * @since BuddyPress (1.2.0) 1204 1368 * 1205 1369 * @global object $activities_template {@link BP_Activity_Template} … … 1218 1382 } 1219 1383 1384 /** 1385 * Filters the activity user link. 1386 * 1387 * @since BuddyPress (1.2.0) 1388 * 1389 * @param string $link The activity user link. 1390 */ 1220 1391 return apply_filters( 'bp_get_activity_user_link', $link ); 1221 1392 } … … 1224 1395 * Output the avatar of the user that performed the action. 1225 1396 * 1226 * @since BuddyPress (1.1 )1397 * @since BuddyPress (1.1.0) 1227 1398 * 1228 1399 * @see bp_get_activity_avatar() for description of arguments. … … 1237 1408 * Return the avatar of the user that performed the action. 1238 1409 * 1239 * @since BuddyPress (1.1 )1410 * @since BuddyPress (1.1.0) 1240 1411 * 1241 1412 * @see bp_core_fetch_avatar() For a description of the arguments. … … 1310 1481 } 1311 1482 1312 // Primary activity avatar is always a user, but can be modified via a filter 1483 /** 1484 * Filters the activity avatar object based on current activity item component. 1485 * 1486 * This is a variable filter dependent on the component used. 1487 * Possible hooks are bp_get_activity_avatar_object_blog, 1488 * bp_get_activity_avatar_object_group, and bp_get_activity_avatar_object_user. 1489 * 1490 * @since BuddyPress (1.1.0) 1491 * 1492 * @param string $component Component being displayed. 1493 */ 1313 1494 $object = apply_filters( 'bp_get_activity_avatar_object_' . $current_activity_item->component, 'user' ); 1314 1495 $item_id = !empty( $user_id ) ? $user_id : $current_activity_item->user_id; 1496 1497 /** 1498 * Filters the activity avatar item ID. 1499 * 1500 * @since BuddyPress (1.2.10) 1501 * 1502 * @param int $item_id Item ID for the activity avatar. 1503 */ 1315 1504 $item_id = apply_filters( 'bp_get_activity_avatar_item_id', $item_id ); 1316 1505 … … 1319 1508 $email = $current_activity_item->user_email; 1320 1509 1510 /** 1511 * Filters the value returned by bp_core_fetch_avatar. 1512 * 1513 * @since BuddyPress (1.1.3) 1514 * 1515 * @param array $value Array of arguments calculated for use with bp_core_fetch_avatar. 1516 */ 1321 1517 return apply_filters( 'bp_get_activity_avatar', bp_core_fetch_avatar( array( 1322 1518 'item_id' => $item_id, … … 1334 1530 * Output the avatar of the object that action was performed on. 1335 1531 * 1336 * @since BuddyPress (1.2 )1532 * @since BuddyPress (1.2.0) 1337 1533 * 1338 1534 * @see bp_get_activity_secondary_avatar() for description of arguments. … … 1348 1544 * Return the avatar of the object that action was performed on 1349 1545 * 1350 * @since BuddyPress (1.2 )1546 * @since BuddyPress (1.2.0) 1351 1547 * 1352 1548 * @see bp_core_fetch_avatar() for description of arguments. … … 1447 1643 } 1448 1644 1449 // Allow object, item_id, and link to be filtered 1645 /** 1646 * Filters the activity secondary avatar object based on current activity item component. 1647 * 1648 * This is a variable filter dependent on the component used. Possible hooks are 1649 * bp_get_activity_secondary_avatar_object_blog, bp_get_activity_secondary_avatar_object_group, 1650 * and bp_get_activity_secondary_avatar_object_user. 1651 * 1652 * @since BuddyPress (1.2.10) 1653 * 1654 * @param string $object Component being displayed. 1655 */ 1450 1656 $object = apply_filters( 'bp_get_activity_secondary_avatar_object_' . $activities_template->activity->component, $object ); 1657 1658 /** 1659 * Filters the activity secondary avatar item ID. 1660 * 1661 * @since BuddyPress (1.2.10) 1662 * 1663 * @param int $item_id ID for the secondary avatar item. 1664 */ 1451 1665 $item_id = apply_filters( 'bp_get_activity_secondary_avatar_item_id', $item_id ); 1452 1666 … … 1469 1683 1470 1684 if ( !empty( $linked ) ) { 1685 1686 /** 1687 * Filters the secondary avatar link for current activity. 1688 * 1689 * @since BuddyPress (1.7.0) 1690 * 1691 * @param string $link Link to wrap the avatar image in. 1692 * @param string $component Activity componant being acted on. 1693 */ 1471 1694 $link = apply_filters( 'bp_get_activity_secondary_avatar_link', $link, $activities_template->activity->component ); 1695 1696 /** 1697 * Filters the determined avatar for the secondary activity item. 1698 * 1699 * @since BuddyPress (1.2.10) 1700 * 1701 * @param string Formatted HTML <img> element, or raw avatar URL. 1702 */ 1703 $avatar = apply_filters( 'bp_get_activity_secondary_avatar', $avatar ); 1472 1704 1473 1705 return sprintf( '<a href="%s" class="%s">%s</a>', 1474 1706 $link, 1475 1707 $link_class, 1476 apply_filters( 'bp_get_activity_secondary_avatar', $avatar )1708 $avatar 1477 1709 ); 1478 1710 } 1479 1711 1480 / / else1712 /** This filter is documented in bp-activity/bp-activity-template.php */ 1481 1713 return apply_filters( 'bp_get_activity_secondary_avatar', $avatar ); 1482 1714 } … … 1485 1717 * Output the activity action 1486 1718 * 1487 * @since BuddyPress (1.2 )1719 * @since BuddyPress (1.2.0) 1488 1720 * 1489 1721 * @param array $args See bp_get_activity_action() … … 1497 1729 * Return the activity action 1498 1730 * 1499 * @since BuddyPress (1.2 )1731 * @since BuddyPress (1.2.0) 1500 1732 * 1501 1733 * @global object $activities_template {@link BP_Activity_Template} … … 1521 1753 1522 1754 $action = $activities_template->activity->action; 1755 1756 /** 1757 * Filters the activity action before the action is inserted as meta. 1758 * 1759 * @since BuddyPress (1.2.10) 1760 * 1761 * @param array $value Array containing the current action, the current activity, and the $args array passed into the function. 1762 */ 1523 1763 $action = apply_filters_ref_array( 'bp_get_activity_action_pre_meta', array( $action, &$activities_template->activity, $args ) ); 1524 1764 … … 1526 1766 $action = bp_insert_activity_meta( $action ); 1527 1767 1768 /** 1769 * Filters the activity action after the action has been inserted as meta. 1770 * 1771 * @since BuddyPress (1.2.0) 1772 * 1773 * @param array $value Array containing the current action, the current activity, and the $args array passed into the function. 1774 */ 1528 1775 return apply_filters_ref_array( 'bp_get_activity_action', array( $action, &$activities_template->activity, $args ) ); 1529 1776 } … … 1532 1779 * Output the activity content body 1533 1780 * 1534 * @since BuddyPress (1.2 )1781 * @since BuddyPress (1.2.0) 1535 1782 * 1536 1783 * @uses bp_get_activity_content_body() … … 1543 1790 * Return the activity content body 1544 1791 * 1545 * @since BuddyPress (1.2 )1792 * @since BuddyPress (1.2.0) 1546 1793 * 1547 1794 * @global object $activities_template {@link BP_Activity_Template} … … 1558 1805 $activities_template->activity->content = bp_insert_activity_meta( $activities_template->activity->content ); 1559 1806 1807 /** 1808 * Filters the activity content body. 1809 * 1810 * @since BuddyPress (1.2.0) 1811 * 1812 * @param array $value Array containing the current activity content body and the current activity. 1813 */ 1560 1814 return apply_filters_ref_array( 'bp_get_activity_content_body', array( $activities_template->activity->content, &$activities_template->activity ) ); 1561 1815 } … … 1564 1818 * Does the activity have content? 1565 1819 * 1566 * @since BuddyPress (1.2 )1820 * @since BuddyPress (1.2.0) 1567 1821 * 1568 1822 * @global object $activities_template {@link BP_Activity_Template} … … 1582 1836 * Output the activity content. 1583 1837 * 1584 * @since BuddyPress (1.0 )1585 * @deprecated BuddyPress (1.5 )1838 * @since BuddyPress (1.0.0) 1839 * @deprecated BuddyPress (1.5.0) 1586 1840 * 1587 1841 * @todo properly deprecate this function. … … 1596 1850 * Return the activity content. 1597 1851 * 1598 * @since BuddyPress (1.0 )1599 * @deprecated BuddyPress (1.5 )1852 * @since BuddyPress (1.0.0) 1853 * @deprecated BuddyPress (1.5.0) 1600 1854 * 1601 1855 * @todo properly deprecate this function. … … 1608 1862 */ 1609 1863 function bp_get_activity_content() { 1864 1610 1865 /** 1611 1866 * If you want to filter activity update content, please use … … 1614 1869 * This function is mainly for backwards comptibility. 1615 1870 */ 1616 1617 1871 $content = bp_get_activity_action() . ' ' . bp_get_activity_content_body(); 1618 1872 return apply_filters( 'bp_get_activity_content', $content ); … … 1625 1879 * as a link to the item's permalink). 1626 1880 * 1627 * @since BuddyPress (1.2 )1881 * @since BuddyPress (1.2.0) 1628 1882 * 1629 1883 * @global object $activities_template {@link BP_Activity_Template} … … 1645 1899 $content = str_replace( '<span class="time-since">%s</span>', '', $content ); 1646 1900 1647 // Insert the time since. 1901 /** 1902 * Filters the activity item time since markup. 1903 * 1904 * @since BuddyPress (1.2.0) 1905 * 1906 * @param array $value Array containing the time since markup and the current activity component. 1907 */ 1648 1908 $time_since = apply_filters_ref_array( 'bp_activity_time_since', array( '<span class="time-since">' . bp_core_time_since( $activities_template->activity->date_recorded ) . '</span>', &$activities_template->activity ) ); 1649 1909 1650 1910 // Insert the permalink 1651 if ( !bp_is_single_activity() ) 1911 if ( !bp_is_single_activity() ) { 1912 1913 /** 1914 * Filters the activity permalink to be added to the activity content. 1915 * 1916 * @since BuddyPress (1.2.0) 1917 * 1918 * @param array $value Array containing the html markup for the activity permalink, after being parsed by sprintf and current activity component. 1919 */ 1652 1920 $content = apply_filters_ref_array( 'bp_activity_permalink', array( sprintf( '%1$s <a href="%2$s" class="view activity-time-since" title="%3$s">%4$s</a>', $content, bp_activity_get_permalink( $activities_template->activity->id, $activities_template->activity ), esc_attr__( 'View Discussion', 'buddypress' ), $time_since ), &$activities_template->activity ) ); 1653 else1921 } else { 1654 1922 $content .= str_pad( $time_since, strlen( $time_since ) + 2, ' ', STR_PAD_BOTH ); 1655 1923 } 1924 1925 /** 1926 * Filters the activity content after activity metadata has been attached. 1927 * 1928 * @since BuddyPress (1.2.0) 1929 * 1930 * @param string $content Activity content with the activity metadata added. 1931 */ 1656 1932 return apply_filters( 'bp_insert_activity_meta', $content ); 1657 1933 } … … 1660 1936 * Determine if the current user can delete an activity item. 1661 1937 * 1662 * @since BuddyPress (1.2 )1938 * @since BuddyPress (1.2.0) 1663 1939 * 1664 1940 * @global object $activities_template {@link BP_Activity_Template} … … 1705 1981 } 1706 1982 1983 /** 1984 * Filters whether the current user can delete an activity item. 1985 * 1986 * @since BuddyPress (1.5.0) 1987 * 1988 * @param bool $can_delete Whether the user can delete the item. 1989 * @param object $activity Current activity item object. 1990 */ 1707 1991 return (bool) apply_filters( 'bp_activity_user_can_delete', $can_delete, $activity ); 1708 1992 } … … 1711 1995 * Output the activity parent content. 1712 1996 * 1713 * @since BuddyPress (1.2 )1997 * @since BuddyPress (1.2.0) 1714 1998 * 1715 1999 * @see bp_get_activity_parent_content() for a description of arguments. … … 1725 2009 * Return the activity content. 1726 2010 * 1727 * @since BuddyPress (1.2 )2011 * @since BuddyPress (1.2.0) 1728 2012 * 1729 2013 * @global object $activities_template {@link BP_Activity_Template} … … 1772 2056 $content = preg_replace( '/<img[^>]*>/Ui', '', $content ); 1773 2057 2058 /** 2059 * Filters the activity parent content. 2060 * 2061 * @since BuddyPress (1.2.0) 2062 * 2063 * @param string $content Content set to be displayed as parent content. 2064 */ 1774 2065 return apply_filters( 'bp_get_activity_parent_content', $content ); 1775 2066 } … … 1778 2069 * Output the parent activity's user ID. 1779 2070 * 1780 * @since BuddyPress (1.7 )2071 * @since BuddyPress (1.7.0) 1781 2072 */ 1782 2073 function bp_activity_parent_user_id() { … … 1787 2078 * Return the parent activity's user ID. 1788 2079 * 1789 * @since BuddyPress (1.7 )2080 * @since BuddyPress (1.7.0) 1790 2081 * 1791 2082 * @global BP_Activity_Template $activities_template … … 1815 2106 $retval = $activities_template->activity_parents[$parent_id]->user_id; 1816 2107 2108 /** 2109 * Filters the activity parent item's user ID. 2110 * 2111 * @since BuddyPress (1.7.0) 2112 * 2113 * @param int $retval ID for the activity parent's user. 2114 */ 1817 2115 return (int) apply_filters( 'bp_get_activity_parent_user_id', $retval ); 1818 2116 } … … 1821 2119 * Output whether or not the current activity is in a current user's favorites. 1822 2120 * 1823 * @since BuddyPress (1.2 )2121 * @since BuddyPress (1.2.0) 1824 2122 * 1825 2123 * @uses bp_get_activity_is_favorite() … … 1832 2130 * Return whether the current activity is in a current user's favorites. 1833 2131 * 1834 * @since BuddyPress (1.2 )2132 * @since BuddyPress (1.2.0) 1835 2133 * 1836 2134 * @global object $activities_template {@link BP_Activity_Template} … … 1842 2140 global $activities_template; 1843 2141 2142 /** 2143 * Filters whether the current activity item is in the current user's favorites. 2144 * 2145 * @since BuddyPress (1.2.0) 2146 * 2147 * @param bool $value Whether or not the current activity item is in the current user's favorites. 2148 */ 1844 2149 return (bool) apply_filters( 'bp_get_activity_is_favorite', in_array( $activities_template->activity->id, (array) $activities_template->my_favs ) ); 1845 2150 } … … 1848 2153 * Output the comment markup for an activity item. 1849 2154 * 1850 * @since BuddyPress (1.2 )2155 * @since BuddyPress (1.2.0) 1851 2156 * 1852 2157 * @todo deprecate $args param … … 1861 2166 * Get the comment markup for an activity item. 1862 2167 * 1863 * @since BuddyPress (1.2 )2168 * @since BuddyPress (1.2.0) 1864 2169 * 1865 2170 * @todo deprecate $args param … … 1888 2193 * split between here and the comment.php template. 1889 2194 * 1890 * @since BuddyPress (1.2 )2195 * @since BuddyPress (1.2.0) 1891 2196 * 1892 2197 * @param object $comment The activity object currently being recursed … … 1904 2209 return false; 1905 2210 2211 /** 2212 * Filters the opening tag for the template that lists activity comments. 2213 * 2214 * @since BuddyPress (1.6.0) 2215 * 2216 * @param string $value Opening tag for the HTML markup to use. 2217 */ 1906 2218 echo apply_filters( 'bp_activity_recurse_comments_start_ul', '<ul>'); 1907 2219 foreach ( (array) $comment->children as $comment_child ) { … … 1923 2235 unset( $activities_template->activity->current_comment ); 1924 2236 } 2237 2238 /** 2239 * Filters the closing tag for the template that list activity comments. 2240 * 2241 * @since BuddyPress (1.6.0) 2242 * 2243 * @param string $value Closing tag for the HTML markup to use. 2244 */ 1925 2245 echo apply_filters( 'bp_activity_recurse_comments_end_ul', '</ul>'); 1926 2246 } … … 1929 2249 * Utility function that returns the comment currently being recursed. 1930 2250 * 1931 * @since BuddyPress (1.5 )2251 * @since BuddyPress (1.5.0) 1932 2252 * 1933 2253 * @global object $activities_template {@link BP_Activity_Template} … … 1942 2262 $current_comment = !empty( $activities_template->activity->current_comment ) ? $activities_template->activity->current_comment : false; 1943 2263 2264 /** 2265 * Filters the current comment being recursed. 2266 * 2267 * @since BuddyPress (1.5.0) 2268 * 2269 * @param object|bool $current_comment The activity comment currently being displayed. False on failure. 2270 */ 1944 2271 return apply_filters( 'bp_activity_current_comment', $current_comment ); 1945 2272 } … … 1949 2276 * Output the ID of the activity comment currently being displayed. 1950 2277 * 1951 * @since BuddyPress (1.5 )2278 * @since BuddyPress (1.5.0) 1952 2279 * 1953 2280 * @uses bp_get_activity_comment_id() … … 1960 2287 * Return the ID of the activity comment currently being displayed. 1961 2288 * 1962 * @since BuddyPress (1.5 )2289 * @since BuddyPress (1.5.0) 1963 2290 * 1964 2291 * @global object $activities_template {@link BP_Activity_Template} … … 1973 2300 $comment_id = isset( $activities_template->activity->current_comment->id ) ? $activities_template->activity->current_comment->id : false; 1974 2301 2302 /** 2303 * Filters the ID of the activity comment currently being displayed. 2304 * 2305 * @since BuddyPress (1.5.0) 2306 * 2307 * @param int|bool $comment_id ID for the comment currently being displayed. 2308 */ 1975 2309 return apply_filters( 'bp_activity_comment_id', $comment_id ); 1976 2310 } … … 1979 2313 * Output the ID of the author of the activity comment currently being displayed. 1980 2314 * 1981 * @since BuddyPress (1.5 )2315 * @since BuddyPress (1.5.0) 1982 2316 * 1983 2317 * @uses bp_get_activity_comment_user_id() … … 1990 2324 * Return the ID of the author of the activity comment currently being displayed. 1991 2325 * 1992 * @since BuddyPress (1.5 )2326 * @since BuddyPress (1.5.0) 1993 2327 * 1994 2328 * @global object $activities_template {@link BP_Activity_Template} … … 2003 2337 $user_id = isset( $activities_template->activity->current_comment->user_id ) ? $activities_template->activity->current_comment->user_id : false; 2004 2338 2339 /** 2340 * Filters the ID of the author of the activity comment currently being displayed. 2341 * 2342 * @since BuddyPress (1.5.0) 2343 * 2344 * @param int|bool $user_id ID for the author of the comment currently being displayed. 2345 */ 2005 2346 return apply_filters( 'bp_activity_comment_user_id', $user_id ); 2006 2347 } … … 2009 2350 * Output the author link for the activity comment currently being displayed. 2010 2351 * 2011 * @since BuddyPress (1.5 )2352 * @since BuddyPress (1.5.0) 2012 2353 * 2013 2354 * @uses bp_get_activity_comment_user_link() … … 2020 2361 * Return the author link for the activity comment currently being displayed. 2021 2362 * 2022 * @since BuddyPress (1.5 )2363 * @since BuddyPress (1.5.0) 2023 2364 * 2024 2365 * @uses bp_core_get_user_domain() … … 2031 2372 $user_link = bp_core_get_user_domain( bp_get_activity_comment_user_id() ); 2032 2373 2374 /** 2375 * Filters the author link for the activity comment currently being displayed. 2376 * 2377 * @since BuddyPress (1.5.0) 2378 * 2379 * @param string $user_link Link for the author of the activity comment currently being displayed. 2380 */ 2033 2381 return apply_filters( 'bp_activity_comment_user_link', $user_link ); 2034 2382 } … … 2037 2385 * Output the author name for the activity comment currently being displayed. 2038 2386 * 2039 * @since BuddyPress (1.5 )2387 * @since BuddyPress (1.5.0) 2040 2388 * 2041 2389 * @uses bp_get_activity_comment_name() … … 2051 2399 * 'bp_activity_comment_name'. 2052 2400 * 2053 * @since BuddyPress (1.5 )2401 * @since BuddyPress (1.5.0) 2054 2402 * 2055 2403 * @global object $activities_template {@link BP_Activity_Template} … … 2062 2410 global $activities_template; 2063 2411 2064 if ( isset( $activities_template->activity->current_comment->user_fullname ) ) 2412 if ( isset( $activities_template->activity->current_comment->user_fullname ) ) { 2413 2065 2414 $name = apply_filters( 'bp_acomment_name', $activities_template->activity->current_comment->user_fullname, $activities_template->activity->current_comment ); // backward compatibility 2066 else2415 } else { 2067 2416 $name = $activities_template->activity->current_comment->display_name; 2068 2417 } 2418 2419 /** 2420 * Filters the name of the author for the activity comment. 2421 * 2422 * @since BuddyPress (1.5.0) 2423 * 2424 * @param string $name Name to be displayed with the activity comment. 2425 */ 2069 2426 return apply_filters( 'bp_activity_comment_name', $name ); 2070 2427 } … … 2073 2430 * Output the date_recorded of the activity comment currently being displayed. 2074 2431 * 2075 * @since BuddyPress (1.5 )2432 * @since BuddyPress (1.5.0) 2076 2433 * 2077 2434 * @uses bp_get_activity_comment_date_recorded() … … 2084 2441 * Return the date_recorded for the activity comment currently being displayed. 2085 2442 * 2086 * @since BuddyPress (1.5 )2443 * @since BuddyPress (1.5.0) 2087 2444 * 2088 2445 * @global object $activities_template {@link BP_Activity_Template} … … 2101 2458 $date_recorded = bp_core_time_since( $activities_template->activity->current_comment->date_recorded ); 2102 2459 2460 /** 2461 * Filters the recorded date of the activity comment currently being displayed. 2462 * 2463 * @since BuddyPress (1.5.0) 2464 * 2465 * @param string|bool Date for the activity comment currently being displayed. 2466 */ 2103 2467 return apply_filters( 'bp_activity_comment_date_recorded', $date_recorded ); 2104 2468 } … … 2107 2471 * Output the 'delete' URL for the activity comment currently being displayed. 2108 2472 * 2109 * @since BuddyPress (1.5 )2473 * @since BuddyPress (1.5.0) 2110 2474 * 2111 2475 * @uses bp_get_activity_comment_delete_link() … … 2118 2482 * Gets the 'delete' URL for the activity comment currently being displayed 2119 2483 * 2120 * @since BuddyPress (1.5 )2484 * @since BuddyPress (1.5.0) 2121 2485 * 2122 2486 * @uses wp_nonce_url() … … 2132 2496 $link = wp_nonce_url( bp_get_root_domain() . '/' . bp_get_activity_slug() . '/delete/' . bp_get_activity_comment_id() . '?cid=' . bp_get_activity_comment_id(), 'bp_activity_delete_link' ); 2133 2497 2498 /** 2499 * Filters the link used for deleting the activity comment currently being displayed. 2500 * 2501 * @since BuddyPress (1.5.0) 2502 * 2503 * @param string $link Link to use for deleting the currently displayed activity comment. 2504 */ 2134 2505 return apply_filters( 'bp_activity_comment_delete_link', $link ); 2135 2506 } … … 2138 2509 * Output the content of the activity comment currently being displayed. 2139 2510 * 2140 * @since BuddyPress (1.5 )2511 * @since BuddyPress (1.5.0) 2141 2512 * 2142 2513 * @uses bp_get_activity_comment_content() … … 2154 2525 * comments only. 2155 2526 * 2156 * @since BuddyPress (1.5 )2527 * @since BuddyPress (1.5.0) 2157 2528 * 2158 2529 * @global object $activities_template {@link BP_Activity_Template} … … 2165 2536 global $activities_template; 2166 2537 2538 /** This filter is documented in bp-activity/bp-activity-template.php */ 2167 2539 $content = apply_filters( 'bp_get_activity_content', $activities_template->activity->current_comment->content ); 2168 2540 2541 /** 2542 * Filters the content of the current activity comment. 2543 * 2544 * @since BuddyPress (1.2.0) 2545 * 2546 * @param string $content The content of the current activity comment. 2547 */ 2169 2548 return apply_filters( 'bp_activity_comment_content', $content ); 2170 2549 } … … 2173 2552 * Output the activity comment count. 2174 2553 * 2175 * @since BuddyPress (1.2 )2554 * @since BuddyPress (1.2.0) 2176 2555 * 2177 2556 * @uses bp_activity_get_comment_count() … … 2184 2563 * Return the comment count of an activity item. 2185 2564 * 2186 * @since BuddyPress (1.2 )2565 * @since BuddyPress (1.2.0) 2187 2566 * 2188 2567 * @global object $activities_template {@link BP_Activity_Template} … … 2207 2586 : 0; 2208 2587 2588 /** 2589 * Filters the activity comment count. 2590 * 2591 * @since BuddyPress (1.2.0) 2592 * 2593 * @param int $count The activity comment count. 2594 */ 2209 2595 return apply_filters( 'bp_activity_get_comment_count', (int) $count ); 2210 2596 } … … 2216 2602 * activity child has, and returns them. 2217 2603 * 2218 * @since BuddyPress (1.2 )2604 * @since BuddyPress (1.2.0) 2219 2605 * 2220 2606 * @uses bp_activity_recurse_comment_count() … … 2239 2625 } 2240 2626 2241 // Filter and return 2627 /** 2628 * Filters the total number of comments for the current comment. 2629 * 2630 * @since BuddyPress (2.1.0) 2631 * 2632 * @param int $new_count New total count for the current comment. 2633 * @param object $comment Activity comment object. 2634 * @param int $count Current iteration count for the current comment. 2635 */ 2242 2636 return apply_filters( 'bp_activity_recurse_comment_count', $new_count, $comment, $count ); 2243 2637 } … … 2256 2650 * @since BuddyPress (2.0.0) 2257 2651 * 2258 * @return int 2652 * @return int $depth Depth for the current activity comment 2259 2653 */ 2260 2654 function bp_activity_get_comment_depth() { 2261 2655 global $activities_template; 2656 2657 /** 2658 * Filters the comment depth of the current activity comment. 2659 * 2660 * @since BuddyPress (2.0.0) 2661 * 2662 * @param int $depth Depth for the current activity comment. 2663 */ 2262 2664 return apply_filters( 'bp_activity_get_comment_depth', $activities_template->activity->current_comment->depth ); 2263 2665 } … … 2266 2668 * Output the activity comment link. 2267 2669 * 2268 * @since BuddyPress (1.2 )2670 * @since BuddyPress (1.2.0) 2269 2671 * 2270 2672 * @uses bp_get_activity_comment_link() … … 2277 2679 * Return the activity comment link. 2278 2680 * 2279 * @since BuddyPress (1.2 )2681 * @since BuddyPress (1.2.0) 2280 2682 * 2281 2683 * @global object $activities_template {@link BP_Activity_Template} … … 2286 2688 function bp_get_activity_comment_link() { 2287 2689 global $activities_template; 2690 2691 /** 2692 * Filters the comment link for the current activity comment. 2693 * 2694 * @since BuddyPress (1.2.0) 2695 * 2696 * @param string $value Constructed URL parameters with activity IDs. 2697 */ 2288 2698 return apply_filters( 'bp_get_activity_comment_link', '?ac=' . $activities_template->activity->id . '/#ac-form-' . $activities_template->activity->id ); 2289 2699 } … … 2292 2702 * Output the activity comment form no javascript display CSS. 2293 2703 * 2294 * @since BuddyPress (1.2 )2704 * @since BuddyPress (1.2.0) 2295 2705 * 2296 2706 * @uses bp_get_activity_comment_form_nojs_display() … … 2303 2713 * Return the activity comment form no javascript display CSS. 2304 2714 * 2305 * @since BuddyPress (1.2 )2715 * @since BuddyPress (1.2.0) 2306 2716 * 2307 2717 * @global object $activities_template {@link BP_Activity_Template} … … 2321 2731 * Output the activity comment form action. 2322 2732 * 2323 * @since BuddyPress (1.2 )2733 * @since BuddyPress (1.2.0) 2324 2734 * 2325 2735 * @uses bp_get_activity_comment_form_action() … … 2332 2742 * Return the activity comment form action. 2333 2743 * 2334 * @since BuddyPress (1.2 )2744 * @since BuddyPress (1.2.0) 2335 2745 * 2336 2746 * @uses home_url() … … 2341 2751 */ 2342 2752 function bp_get_activity_comment_form_action() { 2753 2754 /** 2755 * Filters the activity comment form action URL. 2756 * 2757 * @since BuddyPress (1.2.0) 2758 * 2759 * @param string $value URL to use in the comment form's action attribute. 2760 */ 2343 2761 return apply_filters( 'bp_get_activity_comment_form_action', home_url( bp_get_activity_root_slug() . '/reply/' ) ); 2344 2762 } … … 2347 2765 * Output the activity permalink ID. 2348 2766 * 2349 * @since BuddyPress (1.2 )2767 * @since BuddyPress (1.2.0) 2350 2768 * 2351 2769 * @uses bp_get_activity_permalink_id() … … 2358 2776 * Return the activity permalink ID. 2359 2777 * 2360 * @since BuddyPress (1.2 )2778 * @since BuddyPress (1.2.0) 2361 2779 * 2362 2780 * @uses apply_filters() To call the 'bp_get_activity_permalink_id' hook. … … 2365 2783 */ 2366 2784 function bp_get_activity_permalink_id() { 2785 2786 /** 2787 * Filters the activity action permalink ID. 2788 * 2789 * @since BuddyPress (1.2.0) 2790 * 2791 * @param string $value Current action for the activity item. 2792 */ 2367 2793 return apply_filters( 'bp_get_activity_permalink_id', bp_current_action() ); 2368 2794 } … … 2371 2797 * Output the activity thread permalink. 2372 2798 * 2373 * @since BuddyPress (1.2 )2799 * @since BuddyPress (1.2.0) 2374 2800 * 2375 2801 * @uses bp_get_activity_permalink_id() … … 2382 2808 * Return the activity thread permalink. 2383 2809 * 2384 * @since BuddyPress (1.2 )2810 * @since BuddyPress (1.2.0) 2385 2811 * 2386 2812 * @uses bp_activity_get_permalink() … … 2394 2820 $link = bp_activity_get_permalink( $activities_template->activity->id, $activities_template->activity ); 2395 2821 2822 /** 2823 * Filters the activity thread permalink. 2824 * 2825 * @since BuddyPress (1.2.0) 2826 * 2827 * @param string $link The activity thread permalink. 2828 */ 2396 2829 return apply_filters( 'bp_get_activity_thread_permalink', $link ); 2397 2830 } … … 2400 2833 * Output the activity comment permalink. 2401 2834 * 2402 * @since BuddyPress (1.8 )2835 * @since BuddyPress (1.8.0) 2403 2836 * 2404 2837 * @uses bp_get_activity_permalink_id() … … 2410 2843 * Return the activity comment permalink. 2411 2844 * 2412 * @since BuddyPress (1.8 )2845 * @since BuddyPress (1.8.0) 2413 2846 * 2414 2847 * @uses bp_activity_get_permalink() … … 2433 2866 $link = bp_activity_get_permalink( $activities_template->activity->id, $activities_template->activity ) . $comment_link; 2434 2867 2868 /** 2869 * Filters the activity comment permalink. 2870 * 2871 * @since BuddyPress (1.8.0) 2872 * 2873 * @param string $link Activity comment permalink. 2874 * @param int $comment_id ID for the current activity comment. 2875 */ 2435 2876 return apply_filters( 'bp_get_activity_comment_permalink', $link, $comment_id ); 2436 2877 } … … 2439 2880 * Output the activity favorite link. 2440 2881 * 2441 * @since BuddyPress (1.2 )2882 * @since BuddyPress (1.2.0) 2442 2883 * 2443 2884 * @uses bp_get_activity_favorite_link() … … 2450 2891 * Return the activity favorite link. 2451 2892 * 2452 * @since BuddyPress (1.2 )2893 * @since BuddyPress (1.2.0) 2453 2894 * 2454 2895 * @global object $activities_template {@link BP_Activity_Template} … … 2462 2903 function bp_get_activity_favorite_link() { 2463 2904 global $activities_template; 2905 2906 /** 2907 * Filters the activity favorite link. 2908 * 2909 * @since BuddyPress (1.2.0) 2910 * 2911 * @param string $value Constructed link for favoriting the activity comment. 2912 */ 2464 2913 return apply_filters( 'bp_get_activity_favorite_link', wp_nonce_url( home_url( bp_get_activity_root_slug() . '/favorite/' . $activities_template->activity->id . '/' ), 'mark_favorite' ) ); 2465 2914 } … … 2468 2917 * Output the activity unfavorite link. 2469 2918 * 2470 * @since BuddyPress (1.2 )2919 * @since BuddyPress (1.2.0) 2471 2920 * 2472 2921 * @uses bp_get_activity_unfavorite_link() … … 2479 2928 * Return the activity unfavorite link. 2480 2929 * 2481 * @since BuddyPress (1.2 )2930 * @since BuddyPress (1.2.0) 2482 2931 * 2483 2932 * @global object $activities_template {@link BP_Activity_Template} … … 2491 2940 function bp_get_activity_unfavorite_link() { 2492 2941 global $activities_template; 2942 2943 /** 2944 * Filters the activity unfavorite link. 2945 * 2946 * @since BuddyPress (1.2.0) 2947 * 2948 * @param string $value Constructed link for unfavoriting the activity comment. 2949 */ 2493 2950 return apply_filters( 'bp_get_activity_unfavorite_link', wp_nonce_url( home_url( bp_get_activity_root_slug() . '/unfavorite/' . $activities_template->activity->id . '/' ), 'unmark_favorite' ) ); 2494 2951 } … … 2497 2954 * Output the activity CSS class. 2498 2955 * 2499 * @since BuddyPress (1.0 )2956 * @since BuddyPress (1.0.0) 2500 2957 * 2501 2958 * @uses bp_get_activity_css_class() … … 2508 2965 * Return the current activity item's CSS class. 2509 2966 * 2510 * @since BuddyPress (1.0 )2967 * @since BuddyPress (1.0.0) 2511 2968 * 2512 2969 * @global object $activities_template {@link BP_Activity_Template} … … 2521 2978 global $activities_template; 2522 2979 2980 /** 2981 * Filters the available mini activity actions available as CSS classes. 2982 * 2983 * @since BuddyPress (1.2.0) 2984 * 2985 * @param array $value Array of classes used to determine classes applied to HTML element. 2986 */ 2523 2987 $mini_activity_actions = apply_filters( 'bp_activity_mini_activity_types', array( 2524 2988 'friendship_accepted', … … 2538 3002 $class .= ' has-comments'; 2539 3003 3004 /** 3005 * Filters the determined classes to add to the HTML element. 3006 * 3007 * @since BuddyPress (1.0.0) 3008 * 3009 * @param string $value Classes to be added to the HTML element. 3010 */ 2540 3011 return apply_filters( 'bp_get_activity_css_class', $activities_template->activity->component . ' ' . $activities_template->activity->type . $class ); 2541 3012 } … … 2544 3015 * Output the activity delete link. 2545 3016 * 2546 * @since BuddyPress (1.1 )3017 * @since BuddyPress (1.1.0) 2547 3018 * 2548 3019 * @uses bp_get_activity_delete_link() … … 2555 3026 * Return the activity delete link. 2556 3027 * 2557 * @since BuddyPress (1.1 )3028 * @since BuddyPress (1.1.0) 2558 3029 * 2559 3030 * @global object $activities_template {@link BP_Activity_Template} … … 2582 3053 $link = '<a href="' . esc_url( $url ) . '" class="button item-button bp-secondary-action ' . $class . ' confirm" rel="nofollow">' . __( 'Delete', 'buddypress' ) . '</a>'; 2583 3054 3055 /** 3056 * Filters the activity delete link. 3057 * 3058 * @since BuddyPress (1.1.0) 3059 * 3060 * @param string $link Activity delete HTML link. 3061 */ 2584 3062 return apply_filters( 'bp_get_activity_delete_link', $link ); 2585 3063 } … … 2625 3103 $url = wp_nonce_url( $url, 'bp_activity_delete_link' ); 2626 3104 3105 /** 3106 * Filters the activity delete URL. 3107 * 3108 * @since BuddyPress (2.1.0) 3109 * 3110 * @param string $url Activity delete URL. 3111 */ 2627 3112 return apply_filters( 'bp_get_activity_delete_url', $url ); 2628 3113 } … … 2631 3116 * Output the activity latest update link. 2632 3117 * 2633 * @since BuddyPress (1.2 )3118 * @since BuddyPress (1.2.0) 2634 3119 * 2635 3120 * @see bp_get_activity_latest_update() for description of parameters. … … 2645 3130 * Return the activity latest update link. 2646 3131 * 2647 * @since BuddyPress (1.2 )3132 * @since BuddyPress (1.2.0) 2648 3133 * 2649 3134 * @uses bp_is_user_inactive() … … 2671 3156 return false; 2672 3157 3158 /** 3159 * Filters the latest update excerpt. 3160 * 3161 * @since BuddyPress (1.2.10) 3162 * 3163 * @param string $value The excerpt for the latest update. 3164 */ 2673 3165 $latest_update = apply_filters( 'bp_get_activity_latest_update_excerpt', trim( strip_tags( bp_create_excerpt( $update['content'], 358 ) ) ) ); 2674 3166 … … 2680 3172 ); 2681 3173 3174 /** 3175 * Filters the latest update excerpt with view link appended to the end. 3176 * 3177 * @since BuddyPress (1.2.0) 3178 * 3179 * @param string $latest_update The latest update with "view" link appended to it. 3180 */ 2682 3181 return apply_filters( 'bp_get_activity_latest_update', $latest_update ); 2683 3182 } … … 2686 3185 * Output the activity filter links. 2687 3186 * 2688 * @since BuddyPress (1.1 )3187 * @since BuddyPress (1.1.0) 2689 3188 * 2690 3189 * @see bp_get_activity_filter_links() for description of parameters. … … 2700 3199 * Return the activity filter links. 2701 3200 * 2702 * @since BuddyPress (1.1 )3201 * @since BuddyPress (1.1.0) 2703 3202 * 2704 3203 * @uses wp_parse_args() … … 2768 3267 $link = add_query_arg( 'afilter', $component ); 2769 3268 $link = remove_query_arg( 'acpage' , $link ); 3269 3270 /** 3271 * Filters the activity filter link URL for the current activity component. 3272 * 3273 * @since BuddyPress (1.1.0) 3274 * 3275 * @param string $link The URL for the current component. 3276 * @param string $component The current component getting links constructed for. 3277 */ 2770 3278 $link = apply_filters( 'bp_get_activity_filter_link_href', $link, $component ); 2771 3279 … … 2778 3286 $component_links[] = '<' . $tag . ' id="afilter-clear"><a href="' . esc_attr( $link ) . '">' . __( 'Clear Filter', 'buddypress' ) . '</a></' . $tag . '>'; 2779 3287 3288 /** 3289 * Filters all of the constructed filter links. 3290 * 3291 * @since BuddyPress (1.1.0) 3292 * 3293 * @param string $value All of the links to be displayed to the user. 3294 */ 2780 3295 return apply_filters( 'bp_get_activity_filter_links', implode( "\n", $component_links ) ); 2781 3296 } … … 2784 3299 * Determine if a comment can be made on an activity item. 2785 3300 * 2786 * @since BuddyPress (1.2 )3301 * @since BuddyPress (1.2.0) 2787 3302 * 2788 3303 * @global object $activities_template {@link BP_Activity_Template} … … 2818 3333 } 2819 3334 3335 /** 3336 * Filters whether a comment can be made on an activity item. 3337 * 3338 * @since BuddyPress (1.5.0) 3339 * 3340 * @param bool $can_comment Status on if activity can be commented on. 3341 * @param string $activity_action Current activity action being checked on. 3342 */ 2820 3343 return apply_filters( 'bp_activity_can_comment', $can_comment, $activity_action ); 2821 3344 } … … 2857 3380 } 2858 3381 3382 /** 3383 * Filters whether a comment can be made on an activity reply item. 3384 * 3385 * @since BuddyPress (1.5.0) 3386 * 3387 * @param bool $can_comment Status on if activity reply can be commented on. 3388 * @param string $comment Current comment being checked on. 3389 */ 2859 3390 return (bool) apply_filters( 'bp_activity_can_comment_reply', $can_comment, $comment ); 2860 3391 } 2861 3392 2862 3393 /** 2863 * Determine if anfavorites are allowed.3394 * Determine whether favorites are allowed. 2864 3395 * 2865 3396 * Defaults to true, but can be modified by plugins. 2866 3397 * 2867 * @since BuddyPress (1.5 )3398 * @since BuddyPress (1.5.0) 2868 3399 * 2869 3400 * @uses apply_filters() To call the 'bp_activity_can_favorite' hook. … … 2872 3403 */ 2873 3404 function bp_activity_can_favorite() { 3405 3406 /** 3407 * Filters whether or not users can favorite activity items. 3408 * 3409 * @since BuddyPress (1.5.0) 3410 * 3411 * @param bool $value Whether or not favoriting is enabled. 3412 */ 2874 3413 return apply_filters( 'bp_activity_can_favorite', true ); 2875 3414 } … … 2878 3417 * Output the total favorite count for a specified user. 2879 3418 * 2880 * @since BuddyPress (1.2 )3419 * @since BuddyPress (1.2.0) 2881 3420 * 2882 3421 * @see bp_get_total_favorite_count_for_user() for description of parameters. … … 2892 3431 * Return the total favorite count for a specified user. 2893 3432 * 2894 * @since BuddyPress (1.2 )3433 * @since BuddyPress (1.2.0) 2895 3434 * 2896 3435 * @uses bp_activity_total_favorites_for_user() … … 2912 3451 : false; 2913 3452 3453 /** 3454 * Filters the total favorite count for a user. 3455 * 3456 * @since BuddyPress (1.2.0) 3457 * 3458 * @param int|bool $retval Total favorite count for a user. False on no favorites. 3459 */ 2914 3460 return apply_filters( 'bp_get_total_favorite_count_for_user', $retval ); 2915 3461 } … … 2919 3465 * Output the total mention count for a specified user. 2920 3466 * 2921 * @since BuddyPress (1.2 )3467 * @since BuddyPress (1.2.0) 2922 3468 * 2923 3469 * @see bp_get_total_mention_count_for_user() for description of parameters. … … 2933 3479 * Return the total mention count for a specified user. 2934 3480 * 2935 * @since BuddyPress (1.2 )3481 * @since BuddyPress (1.2.0) 2936 3482 * 2937 3483 * @uses bp_get_user_meta() … … 2953 3499 : false; 2954 3500 3501 /** 3502 * Filters the total mention count for a user. 3503 * 3504 * @since BuddyPress (1.2.0) 3505 * 3506 * @param int|bool $retval Total mention count for a user. False on no mentions. 3507 */ 2955 3508 return apply_filters( 'bp_get_total_mention_count_for_user', $retval ); 2956 3509 } … … 2959 3512 * Output the public message link for displayed user. 2960 3513 * 2961 * @since BuddyPress (1.2 )3514 * @since BuddyPress (1.2.0) 2962 3515 * 2963 3516 * @uses bp_get_send_public_message_link() … … 2970 3523 * Return the public message link for the displayed user. 2971 3524 * 2972 * @since BuddyPress (1.2 )3525 * @since BuddyPress (1.2.0) 2973 3526 * 2974 3527 * @uses is_user_logged_in() … … 2992 3545 } 2993 3546 3547 /** 3548 * Filters the public message link for the displayed user. 3549 * 3550 * @since BuddyPress (1.2.0) 3551 * 3552 * @param string $retval The URL for the public message link. 3553 */ 2994 3554 return apply_filters( 'bp_get_send_public_message_link', $retval ); 2995 3555 } … … 3025 3585 * Output the mentioned user display name. 3026 3586 * 3027 * @since BuddyPress (1.2 )3587 * @since BuddyPress (1.2.0) 3028 3588 * 3029 3589 * @see bp_get_mentioned_user_display_name() for description of parameters. … … 3039 3599 * Returns the mentioned user display name 3040 3600 * 3041 * @since BuddyPress (1.2 )3601 * @since BuddyPress (1.2.0) 3042 3602 * 3043 3603 * @uses bp_core_get_user_displayname() … … 3057 3617 } 3058 3618 3619 /** 3620 * Filters the mentioned user display name. 3621 * 3622 * @since BuddyPress (1.2.0) 3623 * 3624 * @param string $name Display name for the mentioned user. 3625 * @param int|string $user_id_or_username User ID or username use for query. 3626 */ 3059 3627 return apply_filters( 'bp_get_mentioned_user_display_name', $name, $user_id_or_username ); 3060 3628 } … … 3063 3631 * Output button for sending a public message (an @-mention). 3064 3632 * 3065 * @since BuddyPress (1.2 )3633 * @since BuddyPress (1.2.0) 3066 3634 * 3067 3635 * @see bp_get_send_public_message_button() for description of parameters. … … 3077 3645 * Return button for sending a public message (an @-mention). 3078 3646 * 3079 * @since BuddyPress (1.2 )3647 * @since BuddyPress (1.2.0) 3080 3648 * 3081 3649 * @uses bp_get_send_public_message_link() … … 3115 3683 ) ); 3116 3684 3117 // Filter and return the HTML button 3685 /** 3686 * Filters the public message button HTML. 3687 * 3688 * @since BuddyPress (1.2.10) 3689 * 3690 * @param array $r Array of arguments for the public message button HTML. 3691 */ 3118 3692 return bp_get_button( apply_filters( 'bp_get_send_public_message_button', $r ) ); 3119 3693 } … … 3122 3696 * Output the activity post form action. 3123 3697 * 3124 * @since BuddyPress (1.2 )3698 * @since BuddyPress (1.2.0) 3125 3699 * 3126 3700 * @uses bp_get_activity_post_form_action() … … 3133 3707 * Return the activity post form action. 3134 3708 * 3135 * @since BuddyPress (1.2 )3709 * @since BuddyPress (1.2.0) 3136 3710 * 3137 3711 * @uses home_url() … … 3142 3716 */ 3143 3717 function bp_get_activity_post_form_action() { 3718 3719 /** 3720 * Filters the action url used for the activity post form. 3721 * 3722 * @since BuddyPress (1.2.0) 3723 * 3724 * @param string $value URL to be used for the activity post form. 3725 */ 3144 3726 return apply_filters( 'bp_get_activity_post_form_action', home_url( bp_get_activity_root_slug() . '/post/' ) ); 3145 3727 } … … 3153 3735 * <ul> or <ol> wrapper markup. 3154 3736 * 3155 * @since BuddyPress (1.7 )3737 * @since BuddyPress (1.7.0) 3156 3738 * 3157 3739 * @see bp_core_fetch_avatar() for a description of arguments. … … 3205 3787 } 3206 3788 3789 /** 3790 * Filters the list of linked avatars for users who have commented on the current activity item. 3791 * 3792 * @since BuddyPress (1.7.0) 3793 * 3794 * @param string $retval HTML markup for the list of avatars. 3795 * @param array $r Array of arguments used for each avatar. 3796 * @param array $output Array of each avatar found, before imploded into single string. 3797 */ 3207 3798 echo apply_filters( 'bp_activity_comments_user_avatars', $retval, $r, $output ); 3208 3799 } … … 3211 3802 * Return the IDs of every user who's left a comment on the current activity item. 3212 3803 * 3213 * @since BuddyPress (1.7 )3804 * @since BuddyPress (1.7.0) 3214 3805 * 3215 3806 * @return bool|array An array of IDs, or false if none are found. … … 3222 3813 : array(); 3223 3814 3815 /** 3816 * Filters the list of user IDs for the current activity item. 3817 * 3818 * @since BuddyPress (1.7.0) 3819 * 3820 * @param array $value Array of unique user IDs for the current activity item. 3821 */ 3224 3822 return apply_filters( 'bp_activity_get_comments_user_ids', array_unique( $user_ids ) ); 3225 3823 } … … 3228 3826 * Recurse through all activity comments and collect the IDs of the users who wrote them. 3229 3827 * 3230 * @since BuddyPress (1.7 )3828 * @since BuddyPress (1.7.0) 3231 3829 * 3232 3830 * @param array $comments Array of {@link BP_Activity_Activity} items. … … 3258 3856 } 3259 3857 3260 // Filter and return 3858 /** 3859 * Filters the list of user IDs for the current activity comment item. 3860 * 3861 * @since BuddyPress (2.1.0) 3862 * 3863 * @param array $user_ids Array of user IDs for the current activity comment item. 3864 * @param array $comments Array of comments being checked for user IDs. 3865 */ 3261 3866 return apply_filters( 'bp_activity_recurse_comments_user_ids', $user_ids, $comments ); 3262 3867 } … … 3278 3883 */ 3279 3884 function bp_get_displayed_user_mentionname() { 3885 3886 /** 3887 * Filters the mentionname for the displayed user. 3888 * 3889 * @since BuddyPress (1.9.0) 3890 * 3891 * @param string $value The mentionanme for the displayed user. 3892 */ 3280 3893 return apply_filters( 'bp_get_displayed_user_mentionname', bp_activity_get_user_mentionname( bp_displayed_user_id() ) ); 3281 3894 } … … 3284 3897 * Echo a list of all registered activity types for use in dropdowns or checkbox lists. 3285 3898 * 3286 * @since BuddyPress (1.7 )3899 * @since BuddyPress (1.7.0) 3287 3900 * 3288 3901 * @param string $output Optional. Either 'select' or 'checkbox'. Default: 'select'. … … 3322 3935 } 3323 3936 3324 // Allow custom markup 3937 /** 3938 * Fires at the end of the listing of activity types. 3939 * 3940 * This is a variable action hook. The actual hook to use will depend on the output type specified. 3941 * Two default hooks are bp_activity_types_list_select and bp_activity_types_list_checkbox. 3942 * 3943 * @since BuddyPress (1.7.0) 3944 * 3945 * @param array $args Array of arguments passed into function. 3946 * @param string $type Activity type being rendered in the output. 3947 * @param string $description Description of the activity type being rendered. 3948 */ 3325 3949 do_action( 'bp_activity_types_list_' . $output, $args, $type, $description ); 3326 3950 } … … 3338 3962 * Output the sitewide activity feed link. 3339 3963 * 3340 * @since BuddyPress (1.0 )3964 * @since BuddyPress (1.0.0) 3341 3965 * 3342 3966 * @uses bp_get_sitewide_activity_feed_link() … … 3349 3973 * Returns the sitewide activity feed link. 3350 3974 * 3351 * @since BuddyPress (1.0 )3975 * @since BuddyPress (1.0.0) 3352 3976 * 3353 3977 * @uses home_url() … … 3358 3982 */ 3359 3983 function bp_get_sitewide_activity_feed_link() { 3984 3985 /** 3986 * Filters the sidewide activity feed link. 3987 * 3988 * @since BuddyPress (1.0.0) 3989 * 3990 * @param string $value The feed link for sitewide activity. 3991 */ 3360 3992 return apply_filters( 'bp_get_sitewide_activity_feed_link', bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/feed/' ); 3361 3993 } … … 3364 3996 * Output the member activity feed link. 3365 3997 * 3366 * @since BuddyPress (1.2 )3998 * @since BuddyPress (1.2.0) 3367 3999 * 3368 4000 * @uses bp_get_member_activity_feed_link() … … 3375 4007 * Output the member activity feed link. 3376 4008 * 3377 * @since BuddyPress (1.0 )3378 * @deprecated BuddyPress (1.2 )4009 * @since BuddyPress (1.0.0) 4010 * @deprecated BuddyPress (1.2.0) 3379 4011 * 3380 4012 * @todo properly deprecate in favor of bp_member_activity_feed_link(). … … 3387 4019 * Return the member activity feed link. 3388 4020 * 3389 * @since BuddyPress (1.2 )4021 * @since BuddyPress (1.2.0) 3390 4022 * 3391 4023 * @uses bp_is_profile_component() … … 3427 4059 } 3428 4060 4061 /** 4062 * Filters the member activity feed link. 4063 * 4064 * @since BuddyPress (1.0.0) 4065 * 4066 * @param string $link URL for the member activity feed. 4067 */ 3429 4068 return apply_filters( 'bp_get_activities_member_rss_link', $link ); 3430 4069 } … … 3433 4072 * Return the member activity feed link. 3434 4073 * 3435 * @since BuddyPress (1.0 )3436 * @deprecated BuddyPress (1.2 )4074 * @since BuddyPress (1.0.0) 4075 * @deprecated BuddyPress (1.2.0) 3437 4076 * 3438 4077 * @todo properly deprecate in favor of bp_get_member_activity_feed_link(). … … 3450 4089 * Outputs the activity feed item guid. 3451 4090 * 3452 * @since BuddyPress (1.0 )4091 * @since BuddyPress (1.0.0) 3453 4092 * 3454 4093 * @uses bp_activity_feed_item_guid() … … 3461 4100 * Returns the activity feed item guid. 3462 4101 * 3463 * @since BuddyPress (1.2 )4102 * @since BuddyPress (1.2.0) 3464 4103 * 3465 4104 * @global object $activities_template {@link BP_Activity_Template} … … 3471 4110 global $activities_template; 3472 4111 4112 /** 4113 * Filters the activity feed item guid. 4114 * 4115 * @since BuddyPress (1.1.3) 4116 * 4117 * @param string $value Calculated md5 value for the activity feed item. 4118 */ 3473 4119 return apply_filters( 'bp_get_activity_feed_item_guid', md5( $activities_template->activity->date_recorded . '-' . $activities_template->activity->content ) ); 3474 4120 } … … 3477 4123 * Output the activity feed item title. 3478 4124 * 3479 * @since BuddyPress (1.0 )4125 * @since BuddyPress (1.0.0) 3480 4126 * 3481 4127 * @uses bp_get_activity_feed_item_title() … … 3488 4134 * Return the activity feed item title. 3489 4135 * 3490 * @since BuddyPress (1.0 )4136 * @since BuddyPress (1.0.0) 3491 4137 * 3492 4138 * @global object $activities_template {@link BP_Activity_Template} … … 3518 4164 } 3519 4165 4166 /** 4167 * Filters the activity feed item title. 4168 * 4169 * @since BuddyPress (1.0.0) 4170 * 4171 * @param string $title The title for the activity feed item. 4172 */ 3520 4173 return apply_filters( 'bp_get_activity_feed_item_title', $title ); 3521 4174 } … … 3524 4177 * Output the activity feed item link 3525 4178 * 3526 * @since BuddyPress (1.0 )4179 * @since BuddyPress (1.0.0) 3527 4180 * 3528 4181 * @uses bp_get_activity_feed_item_link() … … 3535 4188 * Return the activity feed item link 3536 4189 * 3537 * @since BuddyPress (1.0 )4190 * @since BuddyPress (1.0.0) 3538 4191 * 3539 4192 * @global object $activities_template {@link BP_Activity_Template} … … 3549 4202 : ''; 3550 4203 4204 /** 4205 * Filters the activity feed item link. 4206 * 4207 * @since BuddyPress (1.0.0) 4208 * 4209 * @param string $retval The URL for the activity feed item. 4210 */ 3551 4211 return apply_filters( 'bp_get_activity_feed_item_link', $retval ); 3552 4212 } … … 3555 4215 * Output the activity feed item date. 3556 4216 * 3557 * @since BuddyPress (1.0 )4217 * @since BuddyPress (1.0.0) 3558 4218 * 3559 4219 * @uses bp_get_activity_feed_item_date() … … 3566 4226 * Return the activity feed item date. 3567 4227 * 3568 * @since BuddyPress (1.0 )4228 * @since BuddyPress (1.0.0) 3569 4229 * 3570 4230 * @global object $activities_template {@link BP_Activity_Template} … … 3580 4240 : ''; 3581 4241 4242 /** 4243 * Filters the activity feed item date. 4244 * 4245 * @since BuddyPress (1.0.0) 4246 * 4247 * @param string $retval The date for the activity feed item. 4248 */ 3582 4249 return apply_filters( 'bp_get_activity_feed_item_date', $retval ); 3583 4250 } … … 3586 4253 * Output the activity feed item description. 3587 4254 * 3588 * @since BuddyPress (1.0 )4255 * @since BuddyPress (1.0.0) 3589 4256 * 3590 4257 * @uses bp_get_activity_feed_item_description() … … 3597 4264 * Return the activity feed item description. 3598 4265 * 3599 * @since BuddyPress (1.0 )4266 * @since BuddyPress (1.0.0) 3600 4267 * 3601 4268 * @global object $activities_template {@link BP_Activity_Template} … … 3619 4286 } 3620 4287 4288 /** 4289 * Filters the activity feed item description. 4290 * 4291 * @since BuddyPress (1.0.0) 4292 * 4293 * @param string $content The description for the activity feed item. 4294 */ 3621 4295 return apply_filters( 'bp_get_activity_feed_item_description', $content ); 3622 4296 } … … 3625 4299 * Template tag so we can hook activity feed to <head>. 3626 4300 * 3627 * @since BuddyPress (1.5 )4301 * @since BuddyPress (1.5.0) 3628 4302 * 3629 4303 * @uses bloginfo() … … 3703 4377 3704 4378 /** 3705 * Modify the filter options available in the activity filter dropdown. 3706 * 3707 * @since BuddyPress (2.1.0) 3708 * 3709 * @param array $filters Array of filter options for the given 3710 * context, in the following format: 3711 * $option_value => $option_name 3712 * @param string $context Context for the filter. 'activity' 3713 * 'member', 'member_groups', 'group'. 4379 * Filters the options available in the activity filter dropdown. 4380 * 4381 * @since BuddyPress (2.2.0) 4382 * 4383 * @param array $filters Array of filter options for the given context, in the following format: $option_value => $option_name. 4384 * @param string $context Context for the filter. 'activity', 'member', 'member_groups', 'group'. 3714 4385 */ 3715 4386 $filters = apply_filters( 'bp_get_activity_show_filters_options', $filters, $context ); … … 3724 4395 } 3725 4396 4397 /** 4398 * Filters the HTML markup result for the activity filter dropdown. 4399 * 4400 * @since BuddyPress (2.1.0) 4401 * 4402 * @param string $output HTML output for the activity filter dropdown. 4403 * @param array $filters Array of filter options for the given context, in the following format: $option_value => $option_name. 4404 * @param string $context Context for the filter. 'activity', 'member', 'member_groups', 'group'. 4405 */ 3726 4406 return apply_filters( 'bp_get_activity_show_filters', $output, $filters, $context ); 3727 4407 }
Note: See TracChangeset
for help on using the changeset viewer.