Code

Displays inline code or a code block. The content is escaped, so markup is shown literally.

Code examples
Code examples

Examples

Use [bsv-code]add_action()[/bsv-code] to register a hook.
[bsv-code block="yes" scrollable="yes"]line one
line two
line three[/bsv-code]

Format

[bsv-code parameter="value" ...]your code here[/bsv-code]

Parameters

Parameter Description Default
block Render a <pre><code> block instead of inline <code>. no
scrollable Add the scrollable class to a block. Only applies when block="yes". no

Line breaks in block content are preserved. Content is escaped with esc_html(); do not use it for HTML that should be rendered.

Last updated: