Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nestoru/ea7eeb1e2ce9fafd89420074bcdc7121 to your computer and use it in GitHub Desktop.
Save nestoru/ea7eeb1e2ce9fafd89420074bcdc7121 to your computer and use it in GitHub Desktop.
Internationalize Divi Post Title Module
...
if ( $multi_view->has_value( 'title', 'on' ) ) {
if ( is_et_pb_preview() && isset( $_POST['post_title'] ) && wp_verify_nonce( $_POST['et_pb_preview_nonce'], 'et_pb_preview_nonce' ) ) {
$post_title = sanitize_text_field( wp_unslash( $_POST['post_title'] ) );
} else {
$post_title = esc_html( et_builder_get_current_title() );
}
$post_title = esc_html__($post_title, 'et_builder'); // post title i18n fix
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment