Changeset 1733
- Timestamp:
- 08/28/2009 10:00:19 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity.php
r1718 r1733 240 240 /* Insert the "time-since" placeholder */ 241 241 if ( $content ) { 242 if ( !$pos = strpos( $content, '<blockquote' ) ) { 243 if ( !$pos = strpos( $content, '<div' ) ) { 244 if ( !$pos = strpos( $content, '<ul' ) ) { 245 $content .= ' <span class="time-since">%s</span>'; 242 243 /* Check a time-since span doesn't already exist */ 244 if ( false === strpos( $content, '<span class="time-since">' ) ) { 245 if ( !$pos = strpos( $content, '<blockquote' ) ) { 246 if ( !$pos = strpos( $content, '<div' ) ) { 247 if ( !$pos = strpos( $content, '<ul' ) ) { 248 $content .= ' <span class="time-since">%s</span>'; 249 } 246 250 } 247 251 } 248 252 } 249 253 250 if ( $pos ) {251 $before = substr( $content, 0, $pos );252 $after = substr( $content, $pos, strlen( $content ) );254 if ( (int) $pos ) { 255 $before = substr( $content, 0, (int) $pos ); 256 $after = substr( $content, (int) $pos, strlen( $content ) ); 253 257 254 258 $content = $before . ' <span class="time-since">%s</span>' . $after;
Note: See TracChangeset
for help on using the changeset viewer.