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

Support for Hootkit Custom Code Plugin #280

Closed ajtruckle closed 4 years ago

ajtruckle commented 4 years ago

Hi

I would be grateful if you can consider this please.

I am using the theme Unos Business Premium (a child theme supplied by the developer). The parent theme is Unos Premium.

They supply a simple plugin called Hootkit Custom Code which is a placeholder for our own php and style sheets.

They showed me how easy it was for me to have my custom enlighter css file in a folder under their plugin and theone line of code to import it.

That in itself works and the code renders correctly on the website. But the backend area does not know about this css file location. It has to be in (as documented) a enlighter sub-folder of the child theme.

So can you please consider adding support to look in the hootkit plugin folder (if it is installed)? The benefit for me is I will then not lose settings when upgrading their child theme to a new version.

I hope this makes sense.

Thank you.

ajtruckle commented 4 years ago

Sorry, it is called Hoot Custom code

AndiDittrich commented 4 years ago

it's too much work for such a special theme/plugin.

the child theme approach including the enlighter/ subdirectory is the way to go - when you're updating a child theme you're doing something wrong! a child theme is designed to apply custom changes to a parent theme which survive an update.

on the other hand, you can add any themes as css sources to your page and alter the enlighter_theme filter to include your special theme

ajtruckle commented 4 years ago

on the other hand, you can add any themes as css sources to your page and alter the enlighter_theme filter to include your special theme

Could you please explain a little more about this for me when you have a moment? Thank you.

AndiDittrich commented 4 years ago

see https://github.com/EnlighterJS/documentation/blob/master/wordpress/FilterHooks.md#filterenlighter_themes

you can also add custom themes to the list - but your "solution" posted above may cause dependency issues and the styles might be broken

ajtruckle commented 4 years ago

Do I put enlighter as the left value and then TruckleSoft as the right value?

but your "solution" posted above may cause dependency issues and the styles might be broken

Why do you think this may happen? So I can be aware of it.

AndiDittrich commented 4 years ago

Do I put enlighter as the left value and then TruckleSoft as the right value?

i don't know what you mean

Why do you think this may happen? So I can be aware of it.

you can't - it's related the the wordpress enqueue dependencies.

ajtruckle commented 4 years ago

Using enlighter_theme ....

AndiDittrich commented 4 years ago
ajtruckle commented 4 years ago

Seems to work. Thanks. :) Andrew