- Stato
- Risolto
- Segnalato per
- WPML Multilingual for BuddyPress and BuddyBoss 1.7.0
- Risolto in
- BuddyPress Multilingual 1.8.0
- Plugin/tema correlato
- BuddyBoss Platform
- Tag dell’argomento
- Compatibility
Panoramica del problema
Se usi la funzionalità Tipi di profilo di BuddyBoss Platform, noterai che i tag dei tipi di profilo non sono tradotti nella pagina dei membri o nei profili dei singoli membri.
Soluzione alternativa
Assicurati di avere un backup completo del tuo sito prima di procedere.
- Apri il file …/wp-content/plugins/buddyboss-platform/bp-members/bp-members-functions.php.
- Cerca la riga 3941.
- Sostituisci:
if ( $type_obj = bp_get_member_type_object( $type ) ) { $member_type = $type_obj->labels['singular_name']; } - Con:
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; }