EnlighterJS / Plugin.WordPress

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

Generic Code - Shortcode #281

Closed ajtruckle closed 4 years ago

ajtruckle commented 4 years ago

Hi

I have stumbled over some code on my site (I don't know if it was actually EnlighterJS or not:

[generic highlight="1,19-37"]
REQUIRES "Sory by:" AS $strSortBy VALUES "Talk Number,Theme"

// Iterate the available list ot talk categories
LOOP FROM "Public Talk Categories" NODATERANGE SORTBY "Description"

// Insert a gap between each category
IF "$RowNumber" ISNOT "1"
BLANK *1
END_IF

// Display the category description
TAB =3>
FONT BOLD
FIELD "Description"
EOL
FONT NOBOLD

IF "$strSortBy" IS "Talk Number"
// Display all talks assigned to this category
LOOP FROM "Public Talk Titles" NODATERANGE WHERE "Category" IS CURRENT."Category" SORTBY "Talk Number"
FIELD "Talk Number"
TAB =3>
FIELD "Theme"
EOL
END_LOOP
END_IF

IF "$strSortBy" IS "Theme"
// Display all talks assigned to this category
LOOP FROM "Public Talk Titles" NODATERANGE WHERE "Category" IS CURRENT."Category" SORTBY "Theme"
FIELD "Talk Number"
TAB =3>
FIELD "Theme"
EOL
END_LOOP
END_IF

END_LOOP
[/generic]

But was this a shortcode used by your earlier version? Since i did not include code snippets before in my forum posts. But now all these generic ones are not showing as generic formatting code any more.

AndiDittrich commented 4 years ago

Enlighter supports the "generic" shortcode - but keep in mind that you can remove it by using the filters...

ajtruckle commented 4 years ago

I thought it did support it.

Generic

My actual drop-down in the bbPress editor has a generic option still which works. As far as I am aware I have not knowingly removed your shortcode.

AndiDittrich commented 4 years ago

are the other language shortcodes working ? did you checked your shortcode settings ?

ajtruckle commented 4 years ago

I don't use any other shortcodes. I checked the options as you suggested and they are on:

Settings

That said, I notice the notes there state [enlighter] and not [generic].

AndiDittrich commented 4 years ago

you've disabled all shortcodes....btw. please read the labels/description - "Generic shortcode" is not related to "Generic language"

you also need to enable bbPress shortcode processing - without this setting it wont work

ajtruckle commented 4 years ago

Thank you. I have selected Enlighter Low-Level (recommended) and now the shortcode works. Maybe I lost this setting when I started using the new theme on the website.

Thank you.

ajtruckle commented 4 years ago

I notice your comment:

If you do not need shortcodes (use the Visual-Editor-Integration instead!) it is recommended to disable the shortcode processing for performance reasons.

Maybe in time I will locate all of these [generic] instances and convert them to actual code blocks.