Browse: Home / Classes / LearnDash_Gutenberg_Block /

LearnDash_Gutenberg_Block::convert_block_markers_to_shortcode

LearnDash_Gutenberg_Block::convert_block_markers_to_shortcode( string $content = '',  string $block_slug = '',  string $shortcode_slug = '',  boolean $self_closing = false )

Utility function to parse the WP Block content looking for specific token patterns.


Description #


Parameters #

$content

(string) (Optional) Full page/post content to be searched.

Default value: ''

$block_slug

(string) (Optional) This is the block token pattern to search for. Ex: ld-user-meta, ld-visitor, ld-profile.

Default value: ''

$shortcode_slug

(string) (Optional) This is the actual shortcode token to be used.

Default value: ''

$self_closing

(boolean) (Optional) true if not an inner block.

Default value: false


Return #

(string) $content


Source #

File: includes/gutenberg/lib/class-learndash-gutenberg-block.php


Changelog #

Changelog
Version Description
2.6.0 Introduced.