Translating the custom posts activity
-
Hi bp forum. @shanebp gave me this code to use to display my custom posts in the activity stream
add_filter('bp_blogs_activity_new_post_action', 'record_cpt_activity_action', 1, 3); function record_cpt_activity_action( $activity_action, $post, $post_permalink ) { if( $post->post_type == 'projects' ) { $activity_action = sprintf( __( '%1$s created a new Project, %2$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' ); } return $activity_action; }
Question is translation related. Should I look for this string in the buddypress.po file or translate it directly in the functions.php? And if its the last one- are there any changes I need to make to the code?
Thank you
M
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Translating the custom posts activity’ is closed to new replies.