Skip to content

Instantly share code, notes, and snippets.

@nestoru
Created May 25, 2020 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nestoru/8b3d76becfb9adb473c6843fb09820e3 to your computer and use it in GitHub Desktop.
Save nestoru/8b3d76becfb9adb473c6843fb09820e3 to your computer and use it in GitHub Desktop.
Internationalize Divi Blurb Module
...
if ( '' !== $title ) {
$title = sprintf(
'<%1$s class="et_pb_module_header">%2$s</%1$s>',
et_pb_process_header_level( $header_level, 'h4' ),
et_core_esc_previously( $title )
);
// starts blurb i18n patch
$plain_source_title = strip_tags( $title );
$plain_target_title = esc_html__($plain_source_title, 'et_builder');
$title = str_replace ($plain_source_title, $plain_target_title, $title);
// ends blurb i18n patch
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment