Skip to content

Commit 3a756d7

Browse files
committed
Add promotions
1 parent ff70a74 commit 3a756d7

File tree

1 file changed

+1
-41
lines changed

1 file changed

+1
-41
lines changed

src/php/promotions/elementor-pro.php

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -95,59 +95,19 @@ public function promotion_in_custom_css_section() {
9595
* @param \Elementor\Widget_Base|\Elementor\Element_Base $element The Elementor element.
9696
*/
9797
public function add_promotion_to_custom_css_section( $element ) {
98-
99-
$element->add_control(
100-
'code_snippets_promotion_alert',
101-
[
102-
'type' => \Elementor\Controls_Manager::ALERT,
103-
'alert_type' => 'warning',
104-
'content' => esc_html__( 'Set locations and angle for each breakpoint to ensure the gradient adapts to different screen sizes.', 'code-snippets' ),
105-
'render_type' => 'ui',
106-
]
107-
);
108-
10998
$element->add_control(
11099
'code_snippets_promotion_notice',
111100
[
112101
'type' => \Elementor\Controls_Manager::NOTICE,
113102
'notice_type' => 'info',
114103
'dismissible' => true,
115-
'heading' => esc_html__( '💡 Looking for a better way to manage custom code?', 'code-snippets' ),
104+
'heading' => esc_html__( 'Manage your custom code', 'code-snippets' ),
116105
'content' => sprintf(
117106
/* translators: %s: Code Snippets plugin name */
118107
esc_html__( '%s provides a powerful and user-friendly alternative to Elementor Custom Code, with cloud sync, advanced features, and an intuitive interface.', 'code-snippets' ),
119108
'<strong>Code Snippets Pro</strong>'
120109
),
121110
]
122111
);
123-
124-
$element->add_control(
125-
'code_snippets_promotion_raw_html',
126-
[
127-
'type' => \Elementor\Controls_Manager::RAW_HTML,
128-
'raw' => sprintf(
129-
'<div style="padding:12px;">
130-
<h3 style="margin-top:0; margin-bottom:8px; font-size:15px;">
131-
%s
132-
</h3>
133-
<p style="margin: 0 0 10px;">
134-
%s
135-
</p>
136-
<a href="%s" target="_blank" style="display:inline-block; padding:8px 14px; border-radius:4px; text-decoration:none; font-weight:500; border:1px solid #d33;">
137-
%s
138-
</a>
139-
</div>',
140-
esc_html__( '💡 Looking for a better way to manage custom code?', 'code-snippets' ),
141-
sprintf(
142-
/* translators: %s: Code Snippets plugin name */
143-
esc_html__( '%s provides a powerful and user-friendly alternative to Elementor Custom Code, with cloud sync, advanced features, and an intuitive interface.', 'code-snippets' ),
144-
'<strong>Code Snippets Pro</strong>'
145-
),
146-
esc_url( 'https://example.com/promo' ), // <-- Change to your promo URL.
147-
esc_html__( 'Learn More', 'code-snippets' )
148-
),
149-
'content_classes' => 'your-promo-class',
150-
]
151-
);
152112
}
153113
}

0 commit comments

Comments
 (0)