WebberZone Code Block Highlighting supports two rendering modes: client-side (Prism.js in the browser) and server-side (highlight.php on the server). The mode is set globally and applies to all code blocks on the site. Client-side mode (default) Prism.js loads in the visitor’s browser and highlights the code on page load. The Prism JS bundle (containing all...
Each code block has its own highlighting settings, available in the Syntax Highlighting panel of the Inspector Controls sidebar. These override the global defaults set on the Code Block Highlighting settings page. Language A dropdown listing 40+ supported languages. Selecting a language applies the correct Prism grammar (or highlight.php language in server-side mode). Choosing Plain...
All WebberZone Code Block Highlighting settings are available at Settings > Code Block Highlighting. Settings are stored in a single WordPress option: wzcbh_settings. Highlighting Mode Controls whether syntax highlighting runs in the browser or on the server. Setting key: highlighting-mode. Both modes use the same 21 Prism themes. Color Scheme Selects the syntax highlighting theme...
Developer reference for WebberZone Code Block Highlighting. PHP wrapper functions wzcbh_get_settings() Returns all plugin settings merged with defaults. Returns: array wzcbh_get_option( $key, $default_value ) Returns the value of a single setting key, or the default value if the key does not exist. Parameters: Returns: mixed wzcbh_update_option( $key, $value ) Updates a single setting key in...
WebberZone Code Block Highlighting extends the native WordPress Gutenberg core/code block with syntax highlighting, and is available for free on WordPress.org. WordPress install (The easy way) Manual install Installing via WP CLI On a Multisite network, use --activate-network to network-activate the plugin: Using WebberZone Code Block Highlighting After activation, open the block editor and add...