maxiclo
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Gutenberg Blocks] Code block: Support to RUST languageHi,
The child theme was NOT active. My bad!It works now!!
Why you don’t put RUST in the standard list and/or an option to activate more languages??
Thanks a lot for your support!!
Keep it on this great job!
Forum: Plugins
In reply to: [Advanced Gutenberg Blocks] Code block: Support to RUST languageHi sorry for the late answer and thanks for looking at this.
After your notes I have added back the following code to the Child: Theme Functions (functions.php):
function my_custom_languages( $languages ) {
$languages[] = array(‘slug’ => ‘rust’, mode => ‘rust’, ‘label’ => ‘RUST’) ;return $languages;
}
add_filter( ‘advanced_gutenberg_blocks_code_languages’, ‘my_custom_languages’ );Unfortunately, RUST language do not appear as a Language option ??
Forum: Plugins
In reply to: [Advanced Gutenberg Blocks] Code block: Support to RUST languageJust to confirm that yes:
RUST is a C-like languageForum: Plugins
In reply to: [Advanced Gutenberg Blocks] Code block: Support to RUST languageHi,
thanks for supporting this!!Now:
function my_custom_languages( $languages ) {
$languages[] = array(‘slug’ => ‘rust’, mode => ‘rust’, ‘label’ => ‘RUST’) ;return $languages;
}
add_filter( ‘advanced_gutenberg_blocks_code_languages’, ‘my_custom_languages’ );is correctly added to theme Functions – (functions.php) but again, if I select RUST as the language the preview on backend side works but the view post never show up and the page gets stuck trying to load ?? (blank page)
Forum: Plugins
In reply to: [Advanced Gutenberg Blocks] Code block: Support to RUST languageI have a child theme installed.
Unfortunately, I got:
Your PHP code changes were rolled back due to an error on line 35 of file wp-content/themes/theme-child/functions.php. Please fix and try saving again.
Uncaught Error: Call to undefined function add_filters() in wp-content/themes/theme-child/functions.php:35
If I change:
add_filters( ‘advanced_gutenberg_blocks_code_languages’, ‘my_custom_languages’ );
with
add_action( ‘advanced_gutenberg_blocks_code_languages’, ‘my_custom_languages’ );The functions.php will update.
However, if I select RUST as the language the preview on backend side works but the view post never show up and the page gets stuck!!
Still, works if I select C++ for example as language.
Thanks for the support!
- This reply was modified 6 years, 2 months ago by maxiclo.
Forum: Plugins
In reply to: [CodeMirror Blocks] Rust languageThat is really appreciated. Thanks for this useful plugin!