Changeset 2456 for trunk/bp-activity/bp-activity-templatetags.php
- Timestamp:
- 01/26/2010 01:15:09 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-templatetags.php
r2444 r2456 21 21 $this->pag_page = isset( $_REQUEST['acpage'] ) ? intval( $_REQUEST['acpage'] ) : $page; 22 22 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page; 23 24 /* Check if blog/forum replies are disabled */ 25 $this->disable_blogforum_replies = get_site_option( 'bp-disable-blogforum-comments' ); 26 27 /* Get an array of the logged in user's favorite activities */ 28 $this->my_favs = maybe_unserialize( get_usermeta( $bp->loggedin_user->id, 'bp_favorite_activities' ) ); 23 29 24 30 if ( !empty( $include ) ) { … … 454 460 global $bp, $activities_template; 455 461 456 $my_favs = maybe_unserialize( get_usermeta( $bp->loggedin_user->id, 'bp_favorite_activities' ) ); 457 458 return apply_filters( 'bp_get_activity_is_favorite', in_array( $activities_template->activity->id, (array)$my_favs ) ); 462 return apply_filters( 'bp_get_activity_is_favorite', in_array( $activities_template->activity->id, (array)$activities_template->my_favs ) ); 459 463 } 460 464 … … 685 689 686 690 function bp_activity_can_comment() { 687 global $ bp;688 689 if ( false === get_site_option( 'bp-disable-blogforum-comments' ) || (int)get_site_option( 'bp-disable-blogforum-comments' )) {691 global $activities_template, $bp; 692 693 if ( false === $activities_template->disable_blogforum_replies || (int)$activities_template->disable_blogforum_replies ) { 690 694 if ( 'new_blog_post' == bp_get_activity_action_name() || 'new_blog_comment' == bp_get_activity_action_name() || 'new_forum_topic' == bp_get_activity_action_name() || 'new_forum_post' == bp_get_activity_action_name() ) 691 695 return false;
Note: See TracChangeset
for help on using the changeset viewer.