Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Khang Minh

    (@oddoneout)

    Hi again Captain :),

    To add more languages, you can try this: https://betterwp.net/wordpress-plugins/bwp-syntax/#customization.

    This will be your filter:

    add_filter('bwp_syntax_languages', 'bwp_add_custom_langs');
    
    function bwp_add_custom_langs()
    {
    	$custom_lang = array(
    		'ps' => 'powershell'
    	);
    	return $custom_lang;
    }

    You will have to generate CSS too if you are using Language-based styling.

    Hope that helps!

    Thread Starter Captain.Nemo

    (@captainnemo-1)

    Hi OddOneOut

    Thanks again for the feedback ?? Will give it a try. Do you plan to add it in an upcoming version, like wp-syntax has? ??

    Cheers
    Norbert

    Plugin Author Khang Minh

    (@oddoneout)

    PowerShell as an official language? Consider it done ;).

    Hi. How should I write the filter if I need to add two languages? For example, nsis and ini. Please help me.

    Thanks!

    I have found out.

    add_filter('bwp_syntax_languages', 'bwp_add_custom_langs');
    
    function bwp_add_custom_langs()
    {
    	$custom_lang = array(
    		'nsis' => 'nsis',
    		'ini' => 'ini',
    		'reg' => 'reg',
    	);
    	return $custom_lang;
    }

    Love this beautiful plugin!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Better WordPress Syntax Highlighter] PowerShell syntax highlighting’ is closed to new replies.