Browse: Home / Classes / LearnDash_Gutenberg_Block /


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 #


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

Default value: ''


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

Default value: ''


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

Default value: ''


(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 #

Version Description
2.6.0 Introduced.