PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.7
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.7
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 4.2.1 All 138 releases
← All changes | inc/Shortcodes/CourseMaterialShortcode.php +38 -38 4.3.84.4.7 View file →
@@ -1,38 +1,38 @@
1 -<?php
2 -/**
3 - * Shortcode display single instructor.
4 - */
5 -namespace LearnPress\Shortcodes;
6 -
7 -use LearnPress\Helpers\Singleton;
8 -
9 -class CourseMaterialShortcode extends AbstractShortcode {
10 - use singleton;
11 - protected $shortcode_name = 'course_materials';
12 -
13 - /**
14 - * Show single instructor
15 - *
16 - * @param $attrs [instructor_id: int]
17 - *
18 - * @return string
19 - */
20 - public function render( $attrs ): string {
21 - $content = '';
22 -
23 - try {
24 - if ( empty( $attrs ) ) {
25 - $attrs = [];
26 - }
27 - ob_start();
28 - do_action( 'learn-press/course-material/layout', $attrs );
29 - $content = ob_get_clean();
30 - } catch ( \Throwable $e ) {
31 - ob_end_clean();
32 - error_log( $e->getMessage() );
33 - }
34 -
35 - return $content;
36 - }
37 -}
38 -
1 +<?php
2 +/**
3 + * Shortcode display single instructor.
4 + */
5 +namespace LearnPress\Shortcodes;
6 +
7 +use LearnPress\Helpers\Singleton;
8 +
9 +class CourseMaterialShortcode extends AbstractShortcode {
10 + use singleton;
11 + protected $shortcode_name = 'course_materials';
12 +
13 + /**
14 + * Show single instructor
15 + *
16 + * @param $attrs [instructor_id: int]
17 + *
18 + * @return string
19 + */
20 + public function render( $attrs ): string {
21 + $content = '';
22 +
23 + try {
24 + if ( empty( $attrs ) ) {
25 + $attrs = [];
26 + }
27 + ob_start();
28 + do_action( 'learn-press/course-material/layout', $attrs );
29 + $content = ob_get_clean();
30 + } catch ( \Throwable $e ) {
31 + ob_end_clean();
32 + error_log( $e->getMessage() );
33 + }
34 +
35 + return $content;
36 + }
37 +}
38 +