PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
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 4.1.7.3.1 4.1.7.3.2 All 140 releases
← All changes | config/elementor/course/course-price.php +112 -112 4.3.8 → 4.4.9 View file →
@@ -1,112 +1,112 @@
1 -<?php
2 -/**
3 - * Elementor Controls for widget Course price settings.
4 - *
5 - * @since 4.2.3
6 - * @version 1.0.0
7 - */
8 -
9 -use Elementor\Controls_Manager;
10 -use Elementor\Group_Control_Typography;
11 -use LearnPress\ExternalPlugin\Elementor\LPElementorControls;
12 -
13 -$style_fields = array_merge(
14 - LPElementorControls::add_fields_in_section(
15 - 'style_regular_price',
16 - esc_html__( 'Regular Price', 'learnpress' ),
17 - Controls_Manager::TAB_STYLE,
18 - [
19 - 'price_align' => LPElementorControls::add_responsive_control_type(
20 - 'price_align',
21 - __( 'Alignment', 'learnpress' ),
22 - 'left',
23 - Controls_Manager::CHOOSE,
24 - [
25 - 'options' => [
26 - 'left' => [
27 - 'title' => esc_html__( 'Left', 'learnpress' ),
28 - 'icon' => 'eicon-text-align-left',
29 - ],
30 - 'center' => [
31 - 'title' => esc_html__( 'Center', 'learnpress' ),
32 - 'icon' => 'eicon-text-align-center',
33 - ],
34 - 'right' => [
35 - 'title' => esc_html__( 'Right', 'learnpress' ),
36 - 'icon' => 'eicon-text-align-right',
37 - ],
38 - ],
39 - 'toggle' => false,
40 - 'selectors' => [
41 - '{{WRAPPER}}' => 'text-align: {{VALUE}};',
42 - ],
43 - ]
44 - ),
45 - 'regular_price_color' => LPElementorControls::add_control_type_color(
46 - 'regular_price_color',
47 - esc_html__( 'Color', 'learnpress' ),
48 - [
49 - '{{WRAPPER}} .course-item-price' => 'color: {{VALUE}};',
50 - ]
51 - ),
52 - 'regular_price_typography' => LPElementorControls::add_group_control_type(
53 - 'regular_price_typography',
54 - Group_Control_Typography::get_type(),
55 - '{{WRAPPER}} .course-item-price'
56 - ),
57 - ]
58 - ),
59 - LPElementorControls::add_fields_in_section(
60 - 'style_origin_price',
61 - esc_html__( 'Origin Price', 'learnpress' ),
62 - Controls_Manager::TAB_STYLE,
63 - [
64 - 'origin_price_color' => LPElementorControls::add_control_type_color(
65 - 'origin_price_color',
66 - esc_html__( 'Color', 'learnpress' ),
67 - [
68 - '{{WRAPPER}} .course-item-price .origin-price' => 'color: {{VALUE}};',
69 - ]
70 - ),
71 - 'origin_price_typography' => LPElementorControls::add_group_control_type(
72 - 'origin_price_typography',
73 - Group_Control_Typography::get_type(),
74 - '{{WRAPPER}} .course-item-price .origin-price'
75 - ),
76 - 'origin_price_padding' => LPElementorControls::add_responsive_control_type(
77 - 'origin_price_padding',
78 - esc_html__( 'Padding', 'learnpress' ),
79 - [],
80 - Controls_Manager::DIMENSIONS,
81 - [
82 - 'size_units' => [ 'px', '%', 'custom' ],
83 - 'selectors' => array(
84 - '{{WRAPPER}} .course-item-price .origin-price' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
85 - ),
86 - ]
87 - )
88 - ]
89 - ),
90 - LPElementorControls::add_fields_in_section(
91 - 'style_free_price',
92 - esc_html__( 'Free Price', 'learnpress' ),
93 - Controls_Manager::TAB_STYLE,
94 - [
95 - 'free_price_color' => LPElementorControls::add_control_type_color(
96 - 'free_price_color',
97 - esc_html__( 'Color', 'learnpress' ),
98 - [
99 - '{{WRAPPER}} .course-item-price .free' => 'color: {{VALUE}};',
100 - ]
101 - )
102 - ]
103 - )
104 -);
105 -
106 -return apply_filters(
107 - 'learn-press/elementor/course-price',
108 - apply_filters(
109 - 'learn-press/elementor/course-price/tab-styles',
110 - $style_fields
111 - )
112 -);
1 +<?php
2 +/**
3 + * Elementor Controls for widget Course price settings.
4 + *
5 + * @since 4.2.3
6 + * @version 1.0.0
7 + */
8 +
9 +use Elementor\Controls_Manager;
10 +use Elementor\Group_Control_Typography;
11 +use LearnPress\ExternalPlugin\Elementor\LPElementorControls;
12 +
13 +$style_fields = array_merge(
14 + LPElementorControls::add_fields_in_section(
15 + 'style_regular_price',
16 + esc_html__( 'Regular Price', 'learnpress' ),
17 + Controls_Manager::TAB_STYLE,
18 + [
19 + 'price_align' => LPElementorControls::add_responsive_control_type(
20 + 'price_align',
21 + __( 'Alignment', 'learnpress' ),
22 + 'left',
23 + Controls_Manager::CHOOSE,
24 + [
25 + 'options' => [
26 + 'left' => [
27 + 'title' => esc_html__( 'Left', 'learnpress' ),
28 + 'icon' => 'eicon-text-align-left',
29 + ],
30 + 'center' => [
31 + 'title' => esc_html__( 'Center', 'learnpress' ),
32 + 'icon' => 'eicon-text-align-center',
33 + ],
34 + 'right' => [
35 + 'title' => esc_html__( 'Right', 'learnpress' ),
36 + 'icon' => 'eicon-text-align-right',
37 + ],
38 + ],
39 + 'toggle' => false,
40 + 'selectors' => [
41 + '{{WRAPPER}}' => 'text-align: {{VALUE}};',
42 + ],
43 + ]
44 + ),
45 + 'regular_price_color' => LPElementorControls::add_control_type_color(
46 + 'regular_price_color',
47 + esc_html__( 'Color', 'learnpress' ),
48 + [
49 + '{{WRAPPER}} .course-item-price' => 'color: {{VALUE}};',
50 + ]
51 + ),
52 + 'regular_price_typography' => LPElementorControls::add_group_control_type(
53 + 'regular_price_typography',
54 + Group_Control_Typography::get_type(),
55 + '{{WRAPPER}} .course-item-price'
56 + ),
57 + ]
58 + ),
59 + LPElementorControls::add_fields_in_section(
60 + 'style_origin_price',
61 + esc_html__( 'Origin Price', 'learnpress' ),
62 + Controls_Manager::TAB_STYLE,
63 + [
64 + 'origin_price_color' => LPElementorControls::add_control_type_color(
65 + 'origin_price_color',
66 + esc_html__( 'Color', 'learnpress' ),
67 + [
68 + '{{WRAPPER}} .course-item-price .origin-price' => 'color: {{VALUE}};',
69 + ]
70 + ),
71 + 'origin_price_typography' => LPElementorControls::add_group_control_type(
72 + 'origin_price_typography',
73 + Group_Control_Typography::get_type(),
74 + '{{WRAPPER}} .course-item-price .origin-price'
75 + ),
76 + 'origin_price_padding' => LPElementorControls::add_responsive_control_type(
77 + 'origin_price_padding',
78 + esc_html__( 'Padding', 'learnpress' ),
79 + [],
80 + Controls_Manager::DIMENSIONS,
81 + [
82 + 'size_units' => [ 'px', '%', 'custom' ],
83 + 'selectors' => array(
84 + '{{WRAPPER}} .course-item-price .origin-price' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
85 + ),
86 + ]
87 + )
88 + ]
89 + ),
90 + LPElementorControls::add_fields_in_section(
91 + 'style_free_price',
92 + esc_html__( 'Free Price', 'learnpress' ),
93 + Controls_Manager::TAB_STYLE,
94 + [
95 + 'free_price_color' => LPElementorControls::add_control_type_color(
96 + 'free_price_color',
97 + esc_html__( 'Color', 'learnpress' ),
98 + [
99 + '{{WRAPPER}} .course-item-price .free' => 'color: {{VALUE}};',
100 + ]
101 + )
102 + ]
103 + )
104 +);
105 +
106 +return apply_filters(
107 + 'learn-press/elementor/course-price',
108 + apply_filters(
109 + 'learn-press/elementor/course-price/tab-styles',
110 + $style_fields
111 + )
112 +);