Changeset 436 for trunk/bp-activity/bp-activity-templatetags.php
- Timestamp:
- 10/24/2008 04:00:42 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-activity/bp-activity-templatetags.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-templatetags.php
r391 r436 85 85 } 86 86 87 function bp_activity_get_list( $user_id, $title, $ limit = false ) {88 global $bp_activity_user_id, $bp_activity_limit, $bp_activity_title ;87 function bp_activity_get_list( $user_id, $title, $no_activity, $limit = false ) { 88 global $bp_activity_user_id, $bp_activity_limit, $bp_activity_title, $bp_activity_no_activity; 89 89 90 90 $bp_activity_user_id = $user_id; 91 91 $bp_activity_limit = $limit; 92 92 $bp_activity_title = $title; 93 $bp_activity_no_activity = $no_activity; 93 94 94 95 load_template( TEMPLATEPATH . '/activity/activity-list.php' ); … … 122 123 } 123 124 125 function bp_activities_no_activity() { 126 global $bp_activity_no_activity; 127 echo $bp_activity_no_activity; 128 } 129 124 130 function bp_activity_content() { 125 131 global $activities_template; … … 133 139 } 134 140 135 function bp_activity_content_filter( $content, $date_recorded, $full_name, $insert_time = true, $ is_home= true ) {141 function bp_activity_content_filter( $content, $date_recorded, $full_name, $insert_time = true, $filter_words = true, $filter_you = true ) { 136 142 if ( !$content ) 137 143 return false; … … 146 152 if ( $insert_time ) 147 153 $content[0] = bp_activity_insert_time_since( $content[0], $date_recorded ); 154 155 /* Switch 'their/your' depending on whether the user is logged in or not and viewing their profile */ 156 if ( $filter_words ) { 157 $content[0] = str_replace( __('their', 'buddypress'), __('your', 'buddypress'), $content[0] ); 158 } 148 159 149 /* Switch 'their/your' and 'Name/You' depending on whether the user is logged in or not and viewing their profile */ 150 if ( $is_home ) { 151 $content[0] = str_replace( __('their', 'buddypress'), __('your', 'buddypress'), $content[0] ); 152 $content[0] = str_replace( $full_name, __('You', 'buddypress'), $content[0] ); 160 /* Remove the 'You' and replace if with the persons name */ 161 if ( $filter_you ) { 162 $content[0] = str_replace( $full_name, __('You', 'buddypress'), $content[0] ); 153 163 } 154 164 … … 169 179 170 180 181 171 182 ?>
Note: See TracChangeset
for help on using the changeset viewer.