LearnDash_Gutenberg_Block
Abstract Parent class to hold common functions used by specific LearnDash Blocks.
Description Description
Source Source
File: includes/gutenberg/lib/class-learndash-gutenberg-block.php
Changelog Changelog
Version | Description |
---|---|
2.5.9 | Introduced. |
Methods Methods
- __construct — Constructor.
- convert_block_markers_to_shortcode — Utility function to parse the WP Block content looking for specific token patterns.
- convert_block_markers_to_shortcode_content_filter — Called from the LD function convert_block_markers_to_shortcode() when parsing the block content.
- get_example_post_id — Get example post ID. This is used as part of WP 5.3 Gutenberg Block Example / Preview.
- get_example_user_id — Get example user ID. This is used as part of WP 5.3 Gutenberg Block Example / Preview.
- init — Initialize the hooks.
- learndash_block_markers_shortcode_atts_filter — Called from the LD function learndash_convert_block_markers_shortcode() when parsing the block content.
- prepare_course_list_atts_to_param — Common function used by the ld_course_list, ld_lesson_list, ld_topic_list, and ld_quiz_list called from the render_block short/block processing function.
- preprocess_block_attributes — Pre-Process the block attributes before render.
- register_blocks — Register Block for Gutenberg
- render_block — Render Block
- render_block_wrap — Add wrapper content around content to be returned to server.
- the_content_filter — Hook into 'the_content' WP filter and parse out our block. We want to convert eh Gutenber Block notation to a normal LD shortcode.