Changeset 6523
- Timestamp:
- 11/15/2012 01:39:14 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-template.php
r6502 r6523 1378 1378 1379 1379 return apply_filters( 'bp_get_activity_parent_content', $content ); 1380 } 1381 1382 /** 1383 * Output the parent activity's user ID 1384 * 1385 * @since BuddyPress (1.7) 1386 */ 1387 function bp_activity_parent_user_id() { 1388 echo bp_get_activity_parent_user_id(); 1389 } 1390 1391 /** 1392 * Return the parent activity's user ID 1393 * 1394 * @global BP_Activity_Template $activities_template 1395 * @return bool|int False if parent activity can't be found, otherwise returns the parent activity's user ID 1396 * @since BuddyPress (1.7) 1397 */ 1398 function bp_get_activity_parent_user_id() { 1399 global $activities_template; 1400 1401 $retval = false; 1402 1403 // Get the user ID of the parent activity 1404 $parent_id = $activities_template->activity->item_id; 1405 if ( $parent_id && ! empty( $activities_template->activity_parents[$parent_id] ) ) 1406 $retval = $activities_template->activity_parents[$parent_id]->user_id; 1407 1408 return apply_filters( 'bp_get_activity_parent_user_id', $retval ); 1380 1409 } 1381 1410
Note: See TracChangeset
for help on using the changeset viewer.