You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bootstrap: `wz_cbh()` singleton on `plugins_loaded` → instantiates `Frontend\Blocks`, `Frontend\Styles_Handler` → `Admin\Admin` on `init` (admin only).
32
+
Bootstrap: `wzcbh()` singleton on `plugins_loaded` → instantiates `Frontend\Blocks`, `Frontend\Styles_Handler` → `Admin\Admin` on `init` (admin only).
33
33
34
34
Key files:
35
35
-`includes/class-main.php` — bootstrap and object wiring
@@ -47,7 +47,7 @@ Always `require` the generated `.asset.php` manifest before enqueueing block scr
47
47
48
48
**`maxHeight`** — CSS-only: serialized as inline `style` by the block save function, not touched by the PHP render filter.
49
49
50
-
**`wz_cbh_languages` filter** — controls the editor UI dropdown only. Does not affect which Prism grammars are bundled. Adding a slug without a matching grammar import in `frontend.js` results in plain-text output.
50
+
**`wzcbh_languages` filter** — controls the editor UI dropdown only. Does not affect which Prism grammars are bundled. Adding a slug without a matching grammar import in `frontend.js` results in plain-text output.
51
51
52
52
**Editor canvas styling** — `enqueue_editor_canvas_styles()` extracts only `background` and `color` from the active Prism theme CSS and re-injects them with `.block-editor-block-list__layout` prepended to win the specificity race against the editor's own `pre` styles. Layout properties are intentionally excluded.
53
53
@@ -59,15 +59,15 @@ Always `require` the generated `.asset.php` manifest before enqueueing block scr
59
59
60
60
## Asset loading
61
61
62
-
Prism assets load only on pages containing at least one `core/code` block (`Styles_Handler::enqueue_assets()`). Use `wz_cbh_force_load_assets` to override.
62
+
Prism assets load only on pages containing at least one `core/code` block (`Styles_Handler::enqueue_assets()`). Use `wzcbh_force_load_assets` to override.
63
63
64
64
## Filters and routes
65
65
66
-
-`wz_cbh_languages` — language picker UI list (`slug => label`); UI only, not grammar loader
67
-
-`wz_cbh_color_scheme_css_url` — override the Prism theme CSS URL
68
-
-`wz_cbh_force_load_assets` — force Prism assets to load on every page
69
-
- REST route: `wz-cbh/v1/default-settings`
70
-
- Settings key: `wz_cbh_settings`
66
+
-`wzcbh_languages` — language picker UI list (`slug => label`); UI only, not grammar loader
67
+
-`wzcbh_color_scheme_css_url` — override the Prism theme CSS URL
68
+
-`wzcbh_force_load_assets` — force Prism assets to load on every page
*`wz_cbh_languages` — Filter the language list array (`slug => label`)
67
-
*`wz_cbh_color_scheme_css_url` — Override the Prism theme CSS URL
68
-
*`wz_cbh_force_load_assets` — Force Prism assets to load on every page
64
+
*`wzcbh_languages` — Filter the language list array (`slug => label`)
65
+
*`wzcbh_color_scheme_css_url` — Override the Prism theme CSS URL
66
+
*`wzcbh_force_load_assets` — Force Prism assets to load on every page
69
67
70
68
### GDPR
71
69
72
70
WebberZone Code Block Highlighting does not collect personal data, set cookies, or communicate with any external services.
73
71
74
72
## Screenshots
75
73
76
-

77
-
_Code block in editor with highlighting options_
78
-
79
74
More screenshots are available on the [WordPress plugin page](https://wordpress.org/plugins/webberzone-code-block-highlighting/screenshots/).
80
75
81
76
## Installation
@@ -102,10 +97,10 @@ __Does this plugin replace the core Code block?__
102
97
No. The plugin uses JavaScript and PHP filters to extend `core/code`. Deactivating it leaves behind valid, standard WordPress blocks.
103
98
104
99
__Which languages are supported?__
105
-
40 out of the box. Use the `wz_cbh_languages` filter to add or remove entries from the language picker — note the corresponding Prism.js grammar must also be available on the frontend.
100
+
40 out of the box. Use the `wzcbh_languages` filter to add or remove entries from the language picker — note the corresponding Prism.js grammar must also be available on the frontend.
106
101
107
102
__Does Prism.js load on every page?__
108
-
No. Assets are only enqueued on pages containing at least one code block. Use `wz_cbh_force_load_assets` to override.
103
+
No. Assets are only enqueued on pages containing at least one code block. Use `wzcbh_force_load_assets` to override.
109
104
110
105
__How do I highlight specific lines?__
111
106
Enter a comma-separated list of lines or ranges in the __Highlight Lines__ field in the sidebar (e.g. `1,3-5,8`).
esc_html__( 'Welcome to Code Block Highlighting! Would you like to run the setup wizard to configure the plugin?', 'webberzone-code-block-highlighting' ),
0 commit comments