Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/shanti/public_html/wp-content/plugins/cf7-grid-layout/public/class-cf7-grid-layout-public.php on line 2071
Warning: The magic method Vc_Manager::__wakeup() must have public visibility in /home/shanti/public_html/wp-content/plugins/js_composer_theme/include/classes/core/class-vc-manager.php on line 203
Deprecated: Optional parameter $attach_id declared before required parameter $height is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/js_composer_theme/include/helpers/helpers.php on line 366
Deprecated: Optional parameter $img_url declared before required parameter $height is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/js_composer_theme/include/helpers/helpers.php on line 366
Deprecated: Optional parameter $blank declared before required parameter $slider is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/revslider/admin/includes/plugin-update.class.php on line 2976
Deprecated: Optional parameter $item_count declared before required parameter $access_token is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/revslider/includes/external-sources.class.php on line 68
Deprecated: Optional parameter $item_count declared before required parameter $access_token is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/revslider/includes/external-sources.class.php on line 85
Deprecated: Optional parameter $item_count declared before required parameter $current_photoset is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/revslider/includes/external-sources.class.php on line 1367
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
Deprecated: Return type of phpQueryObject::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shanti/public_html/wp-content/plugins/jupiter-donut/includes/helpers/phpQuery.php on line 4089
Deprecated: Return type of phpQueryObject::next($cssSelector = null) should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shanti/public_html/wp-content/plugins/jupiter-donut/includes/helpers/phpQuery.php on line 4109
Deprecated: Return type of phpQueryObject::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shanti/public_html/wp-content/plugins/jupiter-donut/includes/helpers/phpQuery.php on line 4095
Deprecated: Return type of phpQueryObject::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shanti/public_html/wp-content/plugins/jupiter-donut/includes/helpers/phpQuery.php on line 4126
Deprecated: Return type of phpQueryObject::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shanti/public_html/wp-content/plugins/jupiter-donut/includes/helpers/phpQuery.php on line 4074
Deprecated: Return type of phpQueryObject::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shanti/public_html/wp-content/plugins/jupiter-donut/includes/helpers/phpQuery.php on line 2791
Deprecated: Return type of phpQueryObject::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shanti/public_html/wp-content/plugins/jupiter-donut/includes/helpers/phpQuery.php on line 4134
Deprecated: Return type of phpQueryObject::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shanti/public_html/wp-content/plugins/jupiter-donut/includes/helpers/phpQuery.php on line 4140
Deprecated: Return type of phpQueryObject::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shanti/public_html/wp-content/plugins/jupiter-donut/includes/helpers/phpQuery.php on line 4146
Deprecated: Return type of phpQueryObject::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/shanti/public_html/wp-content/plugins/jupiter-donut/includes/helpers/phpQuery.php on line 4153
Deprecated: Optional parameter $subject declared before required parameter $message is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/jupiter-core/includes/helpers/class-logger.php on line 85
Deprecated: Optional parameter $subject declared before required parameter $message is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/jupiter-core/includes/helpers/class-logger.php on line 99
Deprecated: Optional parameter $subject declared before required parameter $message is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/jupiter-core/includes/helpers/class-logger.php on line 113
Deprecated: Optional parameter $subject declared before required parameter $message is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/jupiter-core/includes/helpers/class-logger.php on line 127
Deprecated: Optional parameter $subject declared before required parameter $message is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/jupiter-core/includes/helpers/class-logger.php on line 141
Deprecated: Optional parameter $subject declared before required parameter $message is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/jupiter-core/includes/helpers/class-logger.php on line 155
Deprecated: Optional parameter $subject declared before required parameter $message is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/jupiter-core/includes/helpers/class-logger.php on line 169
Deprecated: Optional parameter $subject declared before required parameter $message is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/jupiter-core/includes/helpers/class-logger.php on line 183
Deprecated: Optional parameter $subject declared before required parameter $message is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/plugins/jupiter-core/includes/helpers/class-logger.php on line 200
Deprecated: Optional parameter $is_shortcode declared before required parameter $header_style is implicitly treated as a required parameter in /home/shanti/public_html/wp-content/themes/jupiter/framework/helpers/wp_head.php on line 594
Deprecated: Creation of dynamic property mkSidebarGenerator::$custom_sidebar_name is deprecated in /home/shanti/public_html/wp-content/themes/jupiter/framework/admin/generators/sidebar-generator.php on line 30
Deprecated: Creation of dynamic property mk_control_panel::$api_url is deprecated in /home/shanti/public_html/wp-content/themes/jupiter/framework/admin/control-panel/logic/functions.php on line 8
Deprecated: Creation of dynamic property Mk_Theme_Backend_Assets::$assets_js_path is deprecated in /home/shanti/public_html/wp-content/themes/jupiter/framework/admin/general/enqueue-assets.php on line 38
Deprecated: Creation of dynamic property Mk_Theme_Backend_Assets::$assets_css_dir is deprecated in /home/shanti/public_html/wp-content/themes/jupiter/framework/admin/general/enqueue-assets.php on line 39
Deprecated: Creation of dynamic property Mk_Theme_Backend_Assets::$assets_js_dir is deprecated in /home/shanti/public_html/wp-content/themes/jupiter/framework/admin/general/enqueue-assets.php on line 40
Deprecated: Creation of dynamic property Mk_Theme_Backend_Assets::$controlpanel_assets_css_path is deprecated in /home/shanti/public_html/wp-content/themes/jupiter/framework/admin/general/enqueue-assets.php on line 41
Deprecated: Creation of dynamic property Mk_Theme_Backend_Assets::$controlpanel_assets_js_path is deprecated in /home/shanti/public_html/wp-content/themes/jupiter/framework/admin/general/enqueue-assets.php on line 42
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-androidphpmysql-buzzboxsdkhelloworld/wp-androidphpmysql-buzzboxsdkhelloworld.php on line 5348
Deprecated: Use of "self" in callables is deprecated in /home/shanti/public_html/wp-content/plugins/wp-viewpageranimation-noisealert/wp-viewpageranimation-noisealert.php on line 5348
## Product knowledge base
### Quick Links
* [PrismJS Website](https://prismjs.com/)
* [PrismJS Line Numbers Plugin](https://prismjs.com/plugins/line-numbers/)
* [PrismJS Line Height Plugin](https://prismjs.com/plugins/line-highlight/)
* [PrismJS Copy to Clipboard Plugin](https://prismjs.com/plugins/copy-to-clipboard/)
### Video
TBD: create a video tutorial
## Technical description
The widget allow users to add code block with the abilities to:
* Add specific code language.
* Add line numbers for evey code block line.
* Add a copy to clipboard button.
* Highlight specific code block lines.
* Break long code block lines to prevent a horizontal scroll.
* Choose a specific theme for each code block.
* Limit the height of the code block.
* Change the font size of the code block
## Known issues / attention needed
### Style (CSS)
All the css files for the 6 themes and 3 plugins are local and combined to a single CSS file instead of using the CDN, in order to avoid too many requests.
Another reason is because we use custom classes to handle the selected themes and features (as line-numbers and such) when the code highlight is being used more than once in the same page.
There are 3 SCSS files that gets combined into a single file:
* `line-highlight.scss` - Includes the style for the line highlight plugin. (ver 1.23.0)
* `line-numbers.scss` - Includes the style for the line numbers plugin. (ver 1.23.0)
* `main-style.scss` - Includes the rest of the styles needed for the themes and plugins:
* 6 themes: prism-twilight, prism-tomorrow, prism-solarizedlight, prism-okaidia, prism-dark, prism-solid. (ver 1.23.0)
Each theme style is prefixed with a class specific for the theme (in order to support different themes for multiple code highlight instances on the same page). * 1 plugin: "copy to clipboard" style prefixed with a class (to support copy functionality only if the user has enabled it). (ver 1.23.0)
* Specific style for the word-wrap feature
* `code-highlight.scss` - The file helps to minimize HTTP requests by combining all the SCSS files to a single CSS file.
There is a small CSS fix in `main-style.scss` which solves a conflict when highlighting lines while hiding line numbers.
### Functionality (JS)
All the scripts are requested from a CDN instead of using local files since we found it difficult to manage all the plugins to work properly when combined to a single local file.
There are 7 JS Files which we use from a CDN, the last 3 are added only if the user chose the functionality they responsible for:
* `prismjs_core` - The minimum required code for the plugin functionality. (ver 1.23.0)
* `prismjs_loader` Dynamically loading the language according to the user choice. (ver 1.23.0)
* `prismjs_normalize` - Trimming all leading and trailing whitespace of every code block. (ver 1.23.0)
* `prismjs_line_numbers` - Adding line numbers to the code block. (ver 1.23.0)
* `prismjs_line_highlight` - Highlighting specific lines in code block. (ver 1.23.0)
* `prismjs_toolbar` - Registering buttons (we use it for the copy to clipboard button). (ver 1.23.0)
* `prismjs_copy_to_clipboard` - Adding the ability to copy the code block to the clipboard. (ver 1.23.0)
`handler.js` - For the “word wrap” feature to work, we use the `onElementChange` method to run the prism plugin again and adjust to the changes.
There is a plugin named `inline-color` that we had to remove since it only worked when we used the `PrismJS` plugin with all the languages included in the same file. That means one big file that includes the whole functionality of the plugin AND all the languages, which is a huge performance penalty. Instead, we use the prisms-loader plugin which dynamically loads the needed language when the user selects it and it means a smaller JS bundle.
### Functionality (PHP)
`code-highlight.php` - The language control is used to give the user a code language selection from the most popular code languages. We've added an `apply_filter` to the control in order to give the user more flexibility when choosing a code language.
We replaced the `typography` group control with just a `font-size` control since we didn’t manage to make the `line-height` work with the line numbers. This decision was made since most of the controls in the `typography` group control are not so useful in this case anyway.
Fatal error: Uncaught Error: Class "FileBird\Controller\FolderController" not found in /home/shanti/public_html/wp-content/plugins/filebird/includes/Rest/FolderApi.php:13
Stack trace:
#0 /home/shanti/public_html/wp-content/plugins/filebird/includes/Rest/RestApi.php(25): FileBird\Rest\FolderApi->register_rest_routes()
#1 /home/shanti/public_html/wp-includes/class-wp-hook.php(324): FileBird\Rest\RestApi->rest_api_init(Object(WP_REST_Server))
#2 /home/shanti/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#3 /home/shanti/public_html/wp-includes/plugin.php(518): WP_Hook->do_action(Array)
#4 /home/shanti/public_html/wp-includes/rest-api.php(618): do_action('rest_api_init', Object(WP_REST_Server))
#5 /home/shanti/public_html/wp-includes/rest-api.php(442): rest_get_server()
#6 /home/shanti/public_html/wp-includes/class-wp-hook.php(324): rest_api_loaded(Object(WP))
#7 /home/shanti/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#8 /home/shanti/public_html/wp-includes/plugin.php(566): WP_Hook->do_action(Array)
#9 /home/shanti/public_html/wp-includes/class-wp.php(418): do_action_ref_array('parse_request', Array)
#10 /home/shanti/public_html/wp-includes/class-wp.php(813): WP->parse_request('')
#11 /home/shanti/public_html/wp-includes/functions.php(1336): WP->main('')
#12 /home/shanti/public_html/wp-blog-header.php(16): wp()
#13 /home/shanti/public_html/index.php(1): require('/home/shanti/pu...')
#14 {main}
thrown in /home/shanti/public_html/wp-content/plugins/filebird/includes/Rest/FolderApi.php on line 13