 andreS-64
|
Please help me just to exclude Bricks Builder strings from WPML translations list.
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
I am sorry, but there is no simple way we could exclude them.
The Bricks Builder Widgets are expected to be translatable and this is something that is controlled direclty inside Bricks's code.
This is controlled inside /wp-content/themes/bricks/includes/integrations/wpml/wpml.php
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
Spanish (Español )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Adding the following code to the end of the functions.php file of your Bricks Theme should exclude the placeholder when starting a new translation job:
add_filter( 'wpml_tm_job_field_is_translatable', 'wpmltriage_skip_acfdynamic_fields_in_bricks', 10, 2 );
function wpmltriage_skip_acfdynamic_fields_in_bricks( $is_translatable, $job_translate ) {
$data = $job_translate['field_data'];
if ( 'base64' === $job_translate['field_format'] ) {
$data = base64_decode( $data );
}
// Check if data exists and contains '{acf_' at the beginning
if (isset($data) && strpos($data, '{acf_') === 0) {
return false;
}
return true;
}
The issue has been escalated towards our compatibility team for further revision. Once I received more feedback I will contact you on this ticket again.
|