EnlighterJS / Plugin.WordPress

:package: Official WordPress Plugin of EnlighterJS
http://wordpress.org/plugins/enlighter/
GNU General Public License v2.0
115 stars 17 forks source link

[feature request] hide lanuguages #310

Closed chriscamacho closed 3 years ago

chriscamacho commented 3 years ago

There are a great range of languages supported - almost too many

The majority of users will probably only ever need a small number of languages they are blogging about.

Selecting from just a few languages would be much more convenient.

I envision that in settings there would be a scrollable window with language names and a check box (on initial install all would be selected)

this would restrict the number of languages available in the block editor settings, if possible when there are a small number of languages say < 6 instead of a drop down list, if its possible have a set of check boxes - allowing one less click (no need to open a drop down)

chriscamacho commented 3 years ago

had a quick play LanguageManager.php simply editing the Languages array seems to be enough (ie deleting items "hides" them)

You can reorder the languages, if the default language for new blocks was the top item then that would be handy....

AndiDittrich commented 3 years ago

please use the intended filter functions - otherwise your changes are lost by the next upgrade: https://github.com/EnlighterJS/documentation/blob/master/wordpress/FilterHooks.md#filterenlighter_languages

a settings menu is projected for the pro/enterprise editions

chriscamacho commented 3 years ago

didn't fancy editing functions.php and having an update rewrite it...

can I suggest you add to the documentation that plugins like code snippets can be used to inject php, instead of modifying theme code directly....

AndiDittrich commented 3 years ago

you can but for most wordpress users it's too complicated..