탐색 건너뛰기

Open

Reported for: BuddyPress Multilingual 1.7.0

Topic Tags: Compatibility

Overview of the issue

If you use the Profile Types feature from BuddyBoss Platform, you will notice that the profile type tags are not translated in the members’ page or individual member profiles.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open …/wp-content/plugins/buddyboss-platform/bp-members/bp-members-functions.php file.
  • Look for line 3941.
  • Replace:
    			if ( $type_obj = bp_get_member_type_object( $type ) ) {
    				$member_type = $type_obj->labels['singular_name'];
    			}
    
  • With:
    			if ( $type_obj = bp_get_member_type_object( $type ) ) {                                        
    				$member_type = $type_obj->labels['singular_name'];                                              
    				$current_language = apply_filters( 'wpml_current_language', NULL );
    				$user_member_type = bp_get_member_type( $user_id );    
    				$post_id = bp_member_type_post_by_type( $user_member_type );                                        
    				$wpml_post_id = apply_filters( 'wpml_object_id', $post_id, 'bp-member-type', true, $current_language );
    				$wpml_post_meta = get_post_meta( $wpml_post_id, '_bp_member_type_label_singular_name', true );
    				$member_type = $wpml_post_meta;
    			}
    

답장을 남겨주세요

주제를 유지하고 다른 사람을 존중하십시오. 이 게시물과 관련 없는 문제에 대한 도움이 필요한 경우 지원 포럼을 사용하여 채팅을 시작하거나 티켓을 제출하십시오.

다음 태그를 사용할 수 있습니다.
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>