Changeset 5109 for trunk/bp-activity/bp-activity-functions.php
- Timestamp:
- 09/06/2011 12:30:01 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-activity/bp-activity-functions.php (modified) (41 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-functions.php
r4961 r5109 1 1 <?php 2 2 3 /** 3 4 * BuddyPress Activity Functions … … 6 7 * 7 8 * @package BuddyPress 8 * @subpackage Activity Core9 * @subpackage ActivityFunctions 9 10 */ 10 11 … … 15 16 * Checks $bp pages global and looks for directory page 16 17 * 17 * @since 1.5 18 * 19 * @global object $bp Global BuddyPress settings object 18 * @since 1.5.0 19 * 20 * @global object $bp BuddyPress global settings 21 * 20 22 * @return bool True if set, False if empty 21 23 */ … … 29 31 * Searches through the content of an activity item to locate usernames, designated by an @ sign 30 32 * 31 * @ package BuddyPress Activity32 * @since 1.533 * 34 * @param str $content The content of the activity, usually found in $activity->content35 * @return array $usernames Array of the found usernames that match existing users33 * @since 1.5.0 34 * 35 * @param string $content The content of the activity, usually found in $activity->content 36 * 37 * @return bool|array $usernames Array of the found usernames that match existing users. False if no matches 36 38 */ 37 39 function bp_activity_find_mentions( $content ) { … … 49 51 * Resets a user's unread mentions list and count 50 52 * 51 * @package BuddyPress Activity 52 * @since 1.5 53 * @since 1.5.0 53 54 * 54 55 * @param int $user_id The id of the user whose unread mentions are being reset 56 * @uses bp_delete_user_meta() 55 57 */ 56 58 function bp_activity_clear_new_mentions( $user_id ) { … … 62 64 * Adjusts new mention count for mentioned users when activity items are deleted or created 63 65 * 64 * @package BuddyPress Activity 65 * @since 1.5 66 * @since 1.5.0 66 67 * 67 68 * @param int $activity_id The unique id for the activity item 69 * @param string $action Can be 'delete' or 'add'. Defaults to 'add' 70 * 71 * @uses BP_Activity_Activity() {@link BP_Activity_Activity} 72 * @uses bp_activity_find_mentions() 73 * @uses bp_is_username_compatibility_mode() 74 * @uses bp_core_get_userid_from_nicename() 75 * @uses bp_get_user_meta() 76 * @uses bp_update_user_meta() 68 77 */ 69 78 function bp_activity_adjust_mention_count( $activity_id, $action = 'add' ) { … … 114 123 * Formats notifications related to activity 115 124 * 116 * @package BuddyPress Activity 117 * @param str $action The type of activity item. Just 'new_at_mention' for now 125 * @since 1.5.0 126 * 127 * @param string $action The type of activity item. Just 'new_at_mention' for now 118 128 * @param int $item_id The activity id 119 129 * @param int $secondary_item_id In the case of at-mentions, this is the mentioner's id 120 130 * @param int $total_items The total number of notifications to format 121 * @param str $format 'string' to get a BuddyBar-compatible notification, 'array' otherwise 131 * @param string $format 'string' to get a BuddyBar-compatible notification, 'array' otherwise 132 * 133 * @global object $bp BuddyPress global settings 134 * @uses bp_loggedin_user_domain() 135 * @uses bp_get_activity_slug() 136 * @uses bp_core_get_user_displayname() 137 * @uses apply_filters() To call the 'bp_activity_multiple_at_mentions_notification' hook 138 * @uses apply_filters() To call the 'bp_activity_single_at_mentions_notification' hook 139 * @uses do_action() To call 'activity_format_notifications' hook 140 * 141 * @return string $return Formatted @mention notification 122 142 */ 123 143 function bp_activity_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { … … 156 176 } 157 177 158 /** Actions ****************************************************************** */178 /** Actions ******************************************************************/ 159 179 160 180 /** 161 181 * Sets the current action for a given activity stream location 162 182 * 163 * @global obj $bp 164 * @param str $component_id 165 * @param str $key 166 * @param str $value 167 * @return bool False on error, True on success 183 * @since 1.1.0 184 * 185 * @param string $component_id 186 * @param string $key 187 * @param string $value 188 * 189 * @global object $bp BuddyPress global settings 190 * @uses apply_filters() To call the 'bp_activity_set_action' hook 191 * 192 * @return bool False if any param is empty, otherwise true 168 193 */ 169 194 function bp_activity_set_action( $component_id, $key, $value ) { … … 186 211 * Retreives the current action from a component and key 187 212 * 188 * @global obj $bp 189 * @param str $component_id 190 * @param str $key 213 * @since 1.1.0 214 * 215 * @param string $component_id 216 * @param string $key 217 * 218 * @global object $bp BuddyPress global settings 219 * @uses apply_filters() To call the 'bp_activity_get_action' hook 220 * 191 221 * @return mixed False on error, action on success 192 222 */ … … 201 231 } 202 232 203 /** Favorites **************************************************************** */233 /** Favorites ****************************************************************/ 204 234 205 235 /** 206 236 * Get a users favorite activity stream items 207 237 * 208 * @global obj $bp 238 * @since 1.2.0 239 * 209 240 * @param int $user_id 241 * 242 * @global object $bp BuddyPress global settings 243 * @uses bp_get_user_meta() 244 * @uses apply_filters() To call the 'bp_activity_get_user_favorites' hook 245 * 210 246 * @return array Array of users favorite activity stream ID's 211 247 */ … … 226 262 * Add an activity stream item as a favorite for a user 227 263 * 228 * @global obj $bp 264 * @since 1.2.0 265 * 229 266 * @param int $activity_id 230 267 * @param int $user_id 231 * @return bool 268 * 269 * @global object $bp BuddyPress global settings 270 * @uses is_user_logged_in() 271 * @uses bp_get_user_meta() 272 * @uses bp_activity_get_meta() 273 * @uses bp_update_user_meta() 274 * @uses bp_activity_update_meta() 275 * @uses do_action() To call the 'bp_activity_add_user_favorite' hook 276 * @uses do_action() To call the 'bp_activity_add_user_favorite_fail' hook 277 * 278 * @return bool True on success, false on failure 232 279 */ 233 280 function bp_activity_add_user_favorite( $activity_id, $user_id = 0 ) { … … 271 318 } 272 319 320 /** 321 * Remove an activity stream item as a favorite for a user 322 * 323 * @since 1.2.0 324 * 325 * @param int $activity_id 326 * @param int $user_id 327 * 328 * @global object $bp BuddyPress global settings 329 * @uses is_user_logged_in() 330 * @uses bp_get_user_meta() 331 * @uses bp_activity_get_meta() 332 * @uses bp_activity_update_meta() 333 * @uses bp_update_user_meta() 334 * @uses do_action() To call the 'bp_activity_remove_user_favorite' hook 335 * 336 * @return bool True on success, false on failure 337 */ 273 338 function bp_activity_remove_user_favorite( $activity_id, $user_id = 0 ) { 274 339 global $bp; … … 322 387 * Check if activity exists by scanning content 323 388 * 324 * @param str $content 389 * @since 1.1.0 390 * 391 * @param string $content 392 * 393 * @uses BP_Activity_Activity::check_exists_by_content() {@link BP_Activity_Activity} 394 * @uses apply_filters() To call the 'bp_activity_check_exists_by_content' hook 395 * 325 396 * @return bool 326 397 */ … … 330 401 331 402 /** 332 * Retreive the last time activity was updated 333 * 334 * @return str 403 * Retrieve the last time activity was updated 404 * 405 * @since 1.0.0 406 * 407 * @uses BP_Activity_Activity::get_last_updated() {@link BP_Activity_Activity} 408 * @uses apply_filters() To call the 'bp_activity_get_last_updated' hook 409 * 410 * @return string Date last updated 335 411 */ 336 412 function bp_activity_get_last_updated() { … … 339 415 340 416 /** 341 * Retreive the number of favorite activity stream items a user has 342 * 343 * @global obj $bp 417 * Retrieve the number of favorite activity stream items a user has 418 * 419 * @since 1.2.0 420 * 344 421 * @param int $user_id 345 * @return int 422 * 423 * @global object $bp BuddyPress global settings 424 * @uses BP_Activity_Activity::total_favorite_count() {@link BP_Activity_Activity} 425 * 426 * @return int Total favorite count 346 427 */ 347 428 function bp_activity_total_favorites_for_user( $user_id = 0 ) { … … 355 436 } 356 437 357 /** Meta ********************************************************************* */438 /** Meta *********************************************************************/ 358 439 359 440 /** 360 441 * Delete a meta entry from the DB for an activity stream item 361 442 * 362 * @ global DB $wpdb363 * @global obj $bp443 * @since 1.2.0 444 * 364 445 * @param int $activity_id 365 * @param str $meta_key 366 * @param str $meta_value 367 * @return bool 446 * @param string $meta_key 447 * @param string $meta_value 448 * 449 * @global object $wpdb 450 * @global object $bp BuddyPress global settings 451 * @uses wp_cache_delete() 452 * @uses is_wp_error() 453 * 454 * @return bool True on success, false on failure 368 455 */ 369 456 function bp_activity_delete_meta( $activity_id, $meta_key = '', $meta_value = '' ) { … … 410 497 * Get activity meta 411 498 * 412 * @ global DB $wpdb413 * @global obj $bp499 * @since 1.2.0 500 * 414 501 * @param int $activity_id 415 * @param str $meta_key 502 * @param string $meta_key 503 * 504 * @global object $wpdb 505 * @global object $bp BuddyPress global settings 506 * @uses wp_cache_get() 507 * @uses wp_cache_set() 508 * @uses apply_filters() To call the 'bp_activity_get_meta' hook 509 * 416 510 * @return bool 417 511 */ … … 461 555 * Update activity meta 462 556 * 463 * @ global DB $wpdb464 * @global obj $bp557 * @since 1.2.0 558 * 465 559 * @param int $activity_id 466 * @param str $meta_key 467 * @param str $meta_value 468 * @return bool 560 * @param string $meta_key 561 * @param string $meta_value 562 * 563 * @global object $wpdb 564 * @global object $bp BuddyPress global settings 565 * @uses maybe_serialize() 566 * @uses bp_activity_delete_meta() 567 * @uses wp_cache_set() 568 * 569 * @return bool True on success, false on failure 469 570 */ 470 571 function bp_activity_update_meta( $activity_id, $meta_key, $meta_value ) { … … 511 612 } 512 613 513 /** Clean up ******************************************************************/ 514 515 /** 516 * Completely remove 614 /** Clean up *****************************************************************/ 615 616 /** 617 * Completely remove a user's activity data 618 * 619 * @since 1.5.0 620 * 517 621 * @param int $user_id 622 * 623 * @uses is_user_logged_in() 624 * @uses bp_activity_delete() 625 * @uses bp_delete_user_meta() 626 * @uses do_action() To call the 'bp_activity_remove_data' hook 627 * @uses do_action() To call the 'bp_activity_remove_all_user_data' hook 518 628 */ 519 629 function bp_activity_remove_all_user_data( $user_id = 0 ) { … … 543 653 * Register the activity stream actions for updates 544 654 * 545 * @global obj $bp 655 * @since 1.2.0 656 * 657 * @global object $bp BuddyPress global settings 658 * @uses bp_activity_set_action() 659 * @uses do_action() To call the 'updates_register_activity_actions' hook 546 660 */ 547 661 function updates_register_activity_actions() { … … 554 668 add_action( 'bp_register_activity_actions', 'updates_register_activity_actions' ); 555 669 556 /****************************************************************************** *670 /****************************************************************************** 557 671 * Business functions are where all the magic happens in BuddyPress. They will 558 672 * handle the actual saving or manipulation of information. Usually they will … … 561 675 */ 562 676 677 /** 678 * Retrieve an activity or activities 679 * 680 * @since 1.2.0 681 * 682 * @param array $args 683 * 684 * @uses wp_parse_args() 685 * @uses wp_cache_get() 686 * @uses wp_cache_set() 687 * @uses BP_Activity_Activity::get() {@link BP_Activity_Activity} 688 * @uses apply_filters_ref_array() To call the 'bp_activity_get' hook 689 * 690 * @return object $activity The activity/activities object 691 */ 563 692 function bp_activity_get( $args = '' ) { 564 693 $defaults = array( … … 604 733 * Fetch specific activity items 605 734 * 606 * @ package BuddyPress735 * @since 1.2.0 607 736 * 608 737 * @param array $args See docs for $defaults for details 738 * 739 * @uses wp_parse_args() 740 * @uses apply_filters() To call the 'bp_activity_get_specific' hook 741 * @uses BP_Activity_Activity::get() {@link BP_Activity_Activity} 742 * 609 743 * @return array The array returned by BP_Activity_Activity::get() 610 744 */ … … 625 759 } 626 760 761 /** 762 * Add an activity item 763 * 764 * @since 1.1.0 765 * 766 * @param array $args See docs for $defaults for details 767 * 768 * @global object $bp BuddyPress global settings 769 * @uses wp_parse_args() 770 * @uses BP_Activity_Activity::save() {@link BP_Activity_Activity} 771 * @uses BP_Activity_Activity::rebuild_activity_comment_tree() {@link BP_Activity_Activity} 772 * @uses wp_cache_delete() 773 * @uses do_action() To call the 'bp_activity_add' hook 774 * 775 * @return int The activity id 776 */ 627 777 function bp_activity_add( $args = '' ) { 628 778 global $bp; … … 680 830 } 681 831 832 /** 833 * Post an activity update 834 * 835 * @since 1.2.0 836 * 837 * @param array $args See docs for $defaults for details 838 * 839 * @global object $bp BuddyPress global settings 840 * @uses wp_parse_args() 841 * @uses bp_core_is_user_spammer() 842 * @uses bp_core_is_user_deleted() 843 * @uses bp_core_get_userlink() 844 * @uses bp_activity_add() 845 * @uses apply_filters() To call the 'bp_activity_new_update_action' hook 846 * @uses apply_filters() To call the 'bp_activity_new_update_content' hook 847 * @uses apply_filters() To call the 'bp_activity_new_update_primary_link' hook 848 * @uses bp_update_user_meta() 849 * @uses wp_filter_kses() 850 * @uses do_action() To call the 'bp_activity_posted_update' hook 851 * 852 * @return int $activity_id The activity id 853 */ 682 854 function bp_activity_post_update( $args = '' ) { 683 855 global $bp; … … 720 892 } 721 893 894 /** 895 * Add an activity comment 896 * 897 * @since 1.2.0 898 * 899 * @param array $args See docs for $defaults for details 900 * 901 * @global object $bp BuddyPress global settings 902 * @uses wp_parse_args() 903 * @uses bp_activity_add() 904 * @uses apply_filters() To call the 'bp_activity_comment_action' hook 905 * @uses apply_filters() To call the 'bp_activity_comment_content' hook 906 * @uses bp_activity_new_comment_notification() 907 * @uses wp_cache_delete() 908 * @uses do_action() To call the 'bp_activity_comment_posted' hook 909 * 910 * @return int $comment_id The comment id 911 */ 722 912 function bp_activity_new_comment( $args = '' ) { 723 913 global $bp; … … 769 959 770 960 /** 771 * bp_activity_get_activity_id()772 *773 961 * Fetch the activity_id for an existing activity entry in the DB. 774 962 * 775 * @package BuddyPress Activity 963 * @since 1.2.0 964 * 965 * @param array $args See docs for $defaults for details 966 * 967 * @uses wp_parse_args() 968 * @uses apply_filters() To call the 'bp_activity_get_activity_id' hook 969 * @uses BP_Activity_Activity::save() {@link BP_Activity_Activity} 970 * 971 * @return int $activity_id The activity id 776 972 */ 777 973 function bp_activity_get_activity_id( $args = '' ) { … … 793 989 } 794 990 795 /** *991 /** 796 992 * Deleting Activity 797 993 * … … 805 1001 * 806 1002 * If you are deleting an activity comment please use bp_activity_delete_comment(); 807 */ 808 1003 * 1004 * @since 1.0.0 1005 * 1006 * @param array $args See docs for $defaults for details 1007 * 1008 * @global object $bp BuddyPress global settings 1009 * @uses wp_parse_args() 1010 * @uses bp_activity_adjust_mention_count() 1011 * @uses BP_Activity_Activity::delete() {@link BP_Activity_Activity} 1012 * @uses do_action() To call the 'bp_before_activity_delete' hook 1013 * @uses bp_get_user_meta() 1014 * @uses bp_delete_user_meta() 1015 * @uses do_action() To call the 'bp_activity_delete' hook 1016 * @uses do_action() To call the 'bp_activity_deleted_activities' hook 1017 * @uses wp_cache_delete() 1018 * 1019 * @return bool True on success, false on failure 1020 */ 809 1021 function bp_activity_delete( $args = '' ) { 810 1022 global $bp; … … 854 1066 return true; 855 1067 } 856 // The following functions have been deprecated in place of bp_activity_delete() 1068 1069 /** 1070 * Delete an activity item by activity id 1071 * 1072 * You should use bp_activity_delete() instead 1073 * 1074 * @since 1.1.0 1075 * @deprecated 1.2.0 1076 * 1077 * @param array $args See docs for $defaults for details 1078 * 1079 * @global object $bp BuddyPress global settings 1080 * @uses wp_parse_args() 1081 * @uses bp_activity_delete() 1082 * 1083 * @return bool True on success, false on failure 1084 */ 857 1085 function bp_activity_delete_by_item_id( $args = '' ) { 858 1086 global $bp; … … 865 1093 } 866 1094 1095 /** 1096 * Delete an activity item by activity id 1097 * 1098 * You should use bp_activity_delete() instead 1099 * 1100 * @since 1.1.0 1101 * @deprecated 1.2.0 1102 * 1103 * @param int $activity_id The activity id 1104 * 1105 * @uses bp_activity_delete() 1106 * 1107 * @return bool True on success, false on failure 1108 */ 867 1109 function bp_activity_delete_by_activity_id( $activity_id ) { 868 1110 return bp_activity_delete( array( 'id' => $activity_id ) ); 869 1111 } 870 1112 1113 /** 1114 * Delete an activity item by it's content 1115 * 1116 * You should use bp_activity_delete() instead 1117 * 1118 * @since 1.1.0 1119 * @deprecated 1.2.0 1120 * 1121 * @param int $user_id The user id 1122 * @param string $content The activity id 1123 * @param string $component The activity component 1124 * @param string $type The activity type 1125 * 1126 * @uses bp_activity_delete() 1127 * 1128 * @return bool True on success, false on failure 1129 */ 871 1130 function bp_activity_delete_by_content( $user_id, $content, $component, $type ) { 872 1131 return bp_activity_delete( array( 'user_id' => $user_id, 'content' => $content, 'component' => $component, 'type' => $type ) ); 873 1132 } 874 1133 1134 /** 1135 * Delete a user's activity for a component 1136 * 1137 * You should use bp_activity_delete() instead 1138 * 1139 * @since 1.1.0 1140 * @deprecated 1.2.0 1141 * 1142 * @param int $user_id The user id 1143 * @param string $component The activity component 1144 * 1145 * @uses bp_activity_delete() 1146 * 1147 * @return bool True on success, false on failure 1148 */ 875 1149 function bp_activity_delete_for_user_by_component( $user_id, $component ) { 876 1150 return bp_activity_delete( array( 'user_id' => $user_id, 'component' => $component ) ); 877 1151 } 878 // End deprecation 879 1152 1153 /** 1154 * Delete an activity comment 1155 * 1156 * @since 1.2.0 1157 * 1158 * @param int $activity_id The activity id 1159 * @param int $comment_id The activity comment id 1160 * 1161 * @uses apply_filters() To call the 'bp_activity_delete_comment_pre' hook 1162 * @uses bp_activity_delete_children() 1163 * @uses bp_activity_delete() 1164 * @uses BP_Activity_Activity::rebuild_activity_comment_tree() {@link BP_Activity_Activity} 1165 * @uses do_action() To call the 'bp_activity_delete_comment' hook 1166 * 1167 * @return bool True on success, false on failure 1168 */ 880 1169 function bp_activity_delete_comment( $activity_id, $comment_id ) { 881 1170 /*** … … 900 1189 return true; 901 1190 } 1191 1192 /** 1193 * Delete an activity comment's children 1194 * 1195 * @since 1.2.0 1196 * 1197 * @param int $activity_id The activity id 1198 * @param int $comment_id The activity comment id 1199 * 1200 * @uses BP_Activity_Activity::get_child_comments() {@link BP_Activity_Activity} 1201 * @uses bp_activity_delete_children() 1202 * @uses bp_activity_delete() 1203 */ 902 1204 function bp_activity_delete_children( $activity_id, $comment_id) { 903 1205 // Recursively delete all children of this comment. … … 916 1218 * as well, if you already have it available. 917 1219 * 918 * @package BuddyPress 919 * 920 * @uses apply_filters_ref_array() Filter 'bp_activity_get_permalink' to modify the function output 1220 * @since 1.2.0 1221 * 921 1222 * @param int $activity_id The unique id of the activity object 922 * @param obj $activity_obj (optional) The activity object 923 * @return str $link Permalink for the activity item 1223 * @param object $activity_obj (optional) The activity object 1224 * 1225 * @global object $bp BuddyPress global settings 1226 * @uses bp_get_root_domain() 1227 * @uses bp_get_activity_root_slug() 1228 * @uses apply_filters_ref_array() To call the 'bp_activity_get_permalink' hook 1229 * 1230 * @return string $link Permalink for the activity item 924 1231 */ 925 1232 function bp_activity_get_permalink( $activity_id, $activity_obj = false ) { … … 945 1252 } 946 1253 1254 /** 1255 * Hide a user's activity 1256 * 1257 * @since 1.2.0 1258 * 1259 * @param int $user_id The user id 1260 * 1261 * @uses BP_Activity_Activity::hide_all_for_user() {@link BP_Activity_Activity} 1262 * 1263 * @return bool True on success, false on failure 1264 */ 947 1265 function bp_activity_hide_user_activity( $user_id ) { 948 1266 return BP_Activity_Activity::hide_all_for_user( $user_id ); … … 950 1268 951 1269 /** 952 * bp_activity_thumbnail_content_images()953 *954 1270 * Take content, remove all images and replace them with one thumbnail image. 955 1271 * 956 * @package BuddyPress Activity 957 * @param $content str - The content to work with 958 * @param $link str - Optional. The URL that the image should link to 959 * @return $content str - The content with images stripped and replaced with a single thumb. 1272 * @since 1.2.0 1273 * 1274 * @param string $content The content to work with 1275 * @param string $link Optional. The URL that the image should link to 1276 * 1277 * @uses esc_attr() 1278 * @uses apply_filters() To call the 'bp_activity_thumbnail_content_images' hook 1279 * 1280 * @return string $content The content with images stripped and replaced with a single thumb. 960 1281 */ 961 1282 function bp_activity_thumbnail_content_images( $content, $link = false ) { … … 1009 1330 * For that, see {@link bp_activity_comment_embed()}. 1010 1331 * 1332 * @since 1.5 1333 * 1011 1334 * @see BP_Embed 1012 1335 * @see bp_embed_activity_cache() 1013 1336 * @see bp_embed_activity_save_cache() 1014 * @package BuddyPress Activity 1015 * @since 1.5 1337 * 1338 * @uses add_filter() To attach 'bp_get_activity_id' to 'embed_post_id' 1339 * @uses add_filter() To attach 'bp_embed_activity_cache' to 'bp_embed_get_cache' 1340 * @uses add_action() To attach 'bp_embed_activity_save_cache' to 'bp_embed_update_cache' 1016 1341 */ 1017 1342 function bp_activity_embed() { … … 1027 1352 * If no cache and link is embeddable, cache it. 1028 1353 * 1354 * @since 1.5 1355 * 1029 1356 * @see BP_Embed 1030 1357 * @see bp_embed_activity_cache() 1031 1358 * @see bp_embed_activity_save_cache() 1032 * @package BuddyPress Activity 1033 * @since 1.5 1359 * 1360 * @uses add_filter() To attach 'bp_get_activity_comment_id' to 'embed_post_id' 1361 * @uses add_filter() To attach 'bp_embed_activity_cache' to 'bp_embed_get_cache' 1362 * @uses add_action() To attach 'bp_embed_activity_save_cache' to 'bp_embed_update_cache' 1034 1363 */ 1035 1364 function bp_activity_comment_embed() { … … 1043 1372 * When a user clicks on a "Read More" item, make sure embeds are correctly parsed and shown for the expanded content. 1044 1373 * 1045 * @ global object $bp BuddyPress global settings1046 * @param BP_Activity_Activity $activity The activity that is being expanded1374 * @since 1.5 1375 * 1047 1376 * @see BP_Embed 1048 * @since 1.5 1377 * 1378 * @param object $activity The activity that is being expanded 1379 * 1380 * @global object $bp BuddyPress global settings 1381 * @uses add_filter() To attach create_function() to 'embed_post_id' 1382 * @uses add_filter() To attach 'bp_embed_activity_cache' to 'bp_embed_get_cache' 1383 * @uses add_action() To attach 'bp_embed_activity_save_cache' to 'bp_embed_update_cache' 1049 1384 */ 1050 1385 function bp_dtheme_embed_read_more( $activity ) { … … 1064 1399 * {@link bp_activity_embed()} or any other component embeds. 1065 1400 * 1401 * @since 1.5 1402 * 1066 1403 * @see bp_activity_comment_embed() 1067 * @package BuddyPress Activity1068 * @ since 1.51404 * 1405 * @uses remove_filter() To remove 'bp_get_activity_comment_id' from 'embed_post_id' 1069 1406 */ 1070 1407 function bp_activity_comment_embed_after_recurse() { … … 1077 1414 * Used during {@link BP_Embed::parse_oembed()} via {@link bp_activity_embed()}. 1078 1415 * 1079 * @package BuddyPress Activity1080 1416 * @since 1.5 1417 * 1418 * @uses bp_activity_get_meta() 1419 * 1420 * @return mixed The activity meta 1081 1421 */ 1082 1422 function bp_embed_activity_cache( $cache, $id, $cachekey ) { … … 1088 1428 * Used during {@link BP_Embed::parse_oembed()} via {@link bp_activity_embed()}. 1089 1429 * 1090 * @package BuddyPress Activity1091 1430 * @since 1.5 1431 * 1432 * @uses bp_activity_update_meta() 1092 1433 */ 1093 1434 function bp_embed_activity_save_cache( $cache, $cachekey, $id ) {
Note: See TracChangeset
for help on using the changeset viewer.