PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.0
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.0
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / inc / Gutenberg / Blocks / Legacy / ArchiveCourseBlockLegacy.php

ArchiveCourseBlockLegacy.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.0, at inc/Gutenberg/Blocks/Legacy/ArchiveCourseBlockLegacy.php

41 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace LearnPress\Gutenberg\Blocks\Legacy;
4
5 use LearnPress\Gutenberg\Blocks\AbstractBlockType;
6 use LearnPress\Helpers\Template;
7 use LearnPress\Models\CourseModel;
8 use LP_Settings;
9
10 /**
11 * Class ArchiveCourseBlockLegacy
12 *
13 * Handle register, render block template
14 */
15 class ArchiveCourseBlockLegacy extends AbstractBlockType {
16 public $block_name = 'archive-course-legacy';
17 /*public $display_on_templates = [
18 'learnpress/learnpress//archive-lp_course',
19 'learnpress/learnpress//taxonomy-course_tag',
20 'learnpress/learnpress//taxonomy-course_category',
21 ];*/
22
23 /**
24 * Render content of block tag
25 *
26 * @param array $attributes | Attributes of block tag.
27 *
28 * @return false|string
29 */
30 public function render_content_block_template( array $attributes, $content, $block ): string {
31 wp_enqueue_style( 'learnpress' );
32 $page_template = 'archive-course.php';
33
34 ob_start();
35 Template::instance()->get_frontend_template( $page_template, compact( 'attributes' ) );
36 $html = ob_get_clean();
37
38 return $html;
39 }
40 }
41