PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.10
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.10
4.4.10 4.4.9.1 4.4.9 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 All 142 releases
← All changes | inc/TemplateHooks/Admin/AI/AdminAICloseWarningTemplate.php +56 -56 4.3.9 → 4.4.10 View file →
@@ -1,56 +1,56 @@
1 -<?php
2 -
3 -namespace learnpress\inc\TemplateHooks\Admin\AI;
4 -
5 -use LearnPress\Helpers\Singleton;
6 -use LearnPress\Helpers\Template;
7 -
8 -/**
9 - * Class AdminCreateCourseAITemplate
10 - *
11 - * @since 4.3.0
12 - * @version 1.0.1
13 - */
14 -class AdminAICloseWarningTemplate {
15 - use Singleton;
16 -
17 - /**
18 - * @var array|null
19 - */
20 - private ?array $config;
21 -
22 - /**
23 - * Init hooks.
24 - */
25 - public function init() {
26 - add_action( 'admin_footer', [ $this, 'layout_popup' ] );
27 - }
28 -
29 - public function layout_popup() {
30 - $screen = get_current_screen();
31 - if ( ! $screen || $screen->id != 'edit-' . LP_COURSE_CPT ) {
32 - return;
33 - }
34 -
35 - echo $this->template();
36 - }
37 -
38 - public function template(): string {
39 - $components = [
40 - 'wrap-script-template' => '<script type="text/template" id="lp-tmpl-close-warning-ai">',
41 - 'wrap' => '<div class="lp-close-warning-data-ai-wrap">',
42 - 'h2' => sprintf(
43 - '<div class="content-title">%s</div>',
44 - esc_html__( 'Generating data is stopped', 'learnpress' )
45 - ),
46 - 'desc' => sprintf(
47 - '<p class="desc">%s</p>',
48 - esc_html__( 'The process of generating data has been canceled.', 'learnpress' )
49 - ),
50 - 'wrap-end' => '</div>',
51 - 'wrap-script-template-end' => '</script>',
52 - ];
53 -
54 - return Template::combine_components( $components );
55 - }
56 -}
1 +<?php
2 +
3 +namespace learnpress\inc\TemplateHooks\Admin\AI;
4 +
5 +use LearnPress\Helpers\Singleton;
6 +use LearnPress\Helpers\Template;
7 +
8 +/**
9 + * Class AdminCreateCourseAITemplate
10 + *
11 + * @since 4.3.0
12 + * @version 1.0.1
13 + */
14 +class AdminAICloseWarningTemplate {
15 + use Singleton;
16 +
17 + /**
18 + * @var array|null
19 + */
20 + private ?array $config;
21 +
22 + /**
23 + * Init hooks.
24 + */
25 + public function init() {
26 + add_action( 'admin_footer', [ $this, 'layout_popup' ] );
27 + }
28 +
29 + public function layout_popup() {
30 + $screen = get_current_screen();
31 + if ( ! $screen || $screen->id != 'edit-' . LP_COURSE_CPT ) {
32 + return;
33 + }
34 +
35 + echo $this->template();
36 + }
37 +
38 + public function template(): string {
39 + $components = [
40 + 'wrap-script-template' => '<script type="text/template" id="lp-tmpl-close-warning-ai">',
41 + 'wrap' => '<div class="lp-close-warning-data-ai-wrap">',
42 + 'h2' => sprintf(
43 + '<div class="content-title">%s</div>',
44 + esc_html__( 'Generating data is stopped', 'learnpress' )
45 + ),
46 + 'desc' => sprintf(
47 + '<p class="desc">%s</p>',
48 + esc_html__( 'The process of generating data has been canceled.', 'learnpress' )
49 + ),
50 + 'wrap-end' => '</div>',
51 + 'wrap-script-template-end' => '</script>',
52 + ];
53 +
54 + return Template::combine_components( $components );
55 + }
56 +}