- Timestamp:
- 11/27/2023 10:55:27 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/members/template-tags.php
r13504 r13652 1021 1021 <?php 1022 1022 } 1023 1024 /** 1025 * Customize the way to output the Members' loop member latest activities. 1026 * 1027 * @since 12.0.0 1028 * 1029 * @param string $activity_content Formatted latest update for current member. 1030 * @param array $args Array of parsed arguments. 1031 * @param array $latest_update Array of the latest activity data. 1032 * @return string The formatted latest update for current member. 1033 */ 1034 function bp_nouveau_get_member_latest_update( $activity_content = '', $args = array(), $latest_update = array() ) { 1035 if ( ! isset( $latest_update['content'], $latest_update['excerpt'], $latest_update['permalink'] ) ) { 1036 return $activity_content; 1037 } 1038 1039 if ( strlen( $latest_update['excerpt'] ) < strlen( $latest_update['content'] ) ) { 1040 return sprintf( 1041 '%1$s<span class="activity-read-more"><a href="%2$s" rel="nofollow">%3$s</a></span>', 1042 esc_html( $latest_update['excerpt'] ) . "\n", 1043 esc_url( $latest_update['permalink'] ), 1044 esc_html__( 'View full conversation', 'buddypress' ) 1045 ); 1046 } 1047 1048 return esc_html( $latest_update['excerpt'] ); 1049 } 1050 add_filter( 'bp_get_member_latest_update', 'bp_nouveau_get_member_latest_update', 10, 3 );
Note: See TracChangeset
for help on using the changeset viewer.