File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,12 @@ private static function escape_text_content( $string ) {
3535 $ p ->process_tokens ();
3636 $ text = $ p ->get_text ();
3737 $ tokens = $ p ->get_tokens ();
38- $ translators_note = $ p ->get_translators_note () . "\n" ;
38+ $ translators_note = $ p ->get_translators_note ();
3939
4040 if ( ! empty ( $ tokens ) ) {
41- return "<?php $ translators_note echo sprintf( esc_html__( ' $ text', ' " . wp_get_theme ()->get ( 'TextDomain ' ) . "' ), " . implode (
41+ $ php_tag = '<?php ' ;
42+ $ php_tag .= $ translators_note . "\n" ;
43+ $ php_tag .= "echo sprintf( esc_html__( ' $ text', ' " . wp_get_theme ()->get ( 'TextDomain ' ) . "' ), " . implode (
4244 ', ' ,
4345 array_map (
4446 function ( $ token ) {
@@ -47,6 +49,7 @@ function( $token ) {
4749 $ tokens
4850 )
4951 ) . ' ); ?> ' ;
52+ return $ php_tag ;
5053 }
5154
5255 return "<?php esc_html_e(' " . $ string . "', ' " . wp_get_theme ()->get ( 'TextDomain ' ) . "');?> " ;
You can’t perform that action at this time.
0 commit comments