Summary
Optional syntax highlighting for inline <code> elements via a rich-text format extension with a language picker.
Details
- Register a rich-text format (
registerFormatType) that wraps/annotates the core inline-code format with a data-wzcbh-lang attribute and a small language dropdown in the format toolbar.
- Client mode: Prism highlights matching inline elements; server mode: a
render_block / the_content pass runs highlight.php on flagged inline spans with remap_token_classes().
- Off by default via a global setting; inline styling (background, padding) inherited from the active theme.
Why
Technical writing is full of inline references like add_filter() or wp_enqueue_script(); consistent theming between inline and block code is a frequent user request in competing plugins.
Speed to implement: Medium · Usefulness: High · Rank: 5
Summary
Optional syntax highlighting for inline
<code>elements via a rich-text format extension with a language picker.Details
registerFormatType) that wraps/annotates the core inline-code format with adata-wzcbh-langattribute and a small language dropdown in the format toolbar.render_block/the_contentpass runs highlight.php on flagged inline spans withremap_token_classes().Why
Technical writing is full of inline references like
add_filter()orwp_enqueue_script(); consistent theming between inline and block code is a frequent user request in competing plugins.Speed to implement: Medium · Usefulness: High · Rank: 5