Hi again Captain :),
To add more languages, you can try this: http://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!
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
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!