@@ -22,7 +22,7 @@ function register() {
2222 $ this ->name = plugin_lang_get ( 'title ' );
2323 $ this ->description = plugin_lang_get ( 'description ' );
2424 $ this ->page = 'config ' ;
25- $ this ->version = '2.0.17 ' ;
25+ $ this ->version = '2.0.18 ' ;
2626
2727 $ this ->requires ['MantisCore ' ] = '2.0.0 ' ;
2828 # this plugin can coexist with MantisCoreFormatting.
@@ -376,16 +376,16 @@ function string_process_bbcode( $p_string, $p_multiline = TRUE ) {
376376
377377 # code=lang
378378 $p_string = preg_replace_callback('/\[code=(\w+)\](.+)\[\/code\]/imsU',
379- create_function('$m', '
379+ function ($m) {
380380 return "<pre><code class=\"language-" . strtolower($m[1]) . "\">" . $m[2] . "</code></pre>";
381- ')
381+ }
382382 , $p_string);
383383
384384 # code=lang start=n
385385 $p_string = preg_replace_callback('/\[code=(\w+)\ start=([0-9]+)\](.+)\[\/code\]/imsU',
386- create_function('$m', '
386+ function ($m) {
387387 return "<pre class=\"line-numbers\" data-start=\"" . $m[2] . "\"><code class=\"language-" . strtolower($m[1]) . "\">" . $m[3] . "</code></pre>";
388- ')
388+ }
389389 , $p_string);
390390
391391 # process quotes.
@@ -498,16 +498,16 @@ function string_strip_bbcode( $p_string, $p_multiline = TRUE ) {
498498
499499 # code=lang
500500 $ p_string = preg_replace_callback ('/\[code=(\w+)\](.+)\[\/code\]/imsU ' ,
501- create_function ( ' $m ' , '
501+ function ( $ m ) {
502502 return $ m [2 ];
503- ' )
503+ }
504504 , $ p_string );
505505
506506 # code=lang start=n
507507 $ p_string = preg_replace_callback ('/\[code=(\w+)\ start=([0-9]+)\](.+)\[\/code\]/imsU ' ,
508- create_function ( ' $m ' , '
508+ function ( $ m ) {
509509 return $ m [3 ];
510- ' )
510+ }
511511 , $ p_string );
512512
513513 # process quotes.
@@ -544,9 +544,9 @@ function restore_pre_code_tags( $p_string, $p_multiline = true ) {
544544 $ tags = implode ( '| ' , $ tags );
545545
546546 $ t_string = preg_replace_callback ('/<( ' . $ tags . ')(.*?)>/ui ' ,
547- create_function ( ' $m ' , '
547+ function ( $ m ) {
548548 return "< " . $ m [1 ] . str_replace ("" " , "\"" , $ m [2 ]) . "> " ;
549- ' )
549+ }
550550 , $ t_string );
551551
552552 $ t_string = preg_replace ( '/<\/( ' . $ tags . ')\s*>/ui ' , '</ \\1> ' , $ t_string );
0 commit comments