PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.1
Elementor Website Builder – more than just a page builder v4.2.1
4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 All 455 releases
← All changes | modules/atomic-widgets/elements/atomic-button/atomic-button.php +18 -1 4.0.7 → 4.2.1 View file →
@@ -53,9 +53,10 @@
53 53 ->default( [
54 54 'content' => String_Prop_Type::generate( __( 'Click here', 'elementor' ) ),
55 55 'children' => [],
56 56 ] )
57 - ->description( 'The text displayed on the button.' ),
57 + ->description( 'The text displayed on the button.' )
58 + ->alias( 'content', 'label' ),
58 59
59 60 'link' => Link_Prop_Type::make(),
60 61
61 62 'tag' => String_Prop_Type::make()
@@ -71,8 +72,9 @@
71 72 protected function define_atomic_controls(): array {
72 73 return [
73 74 Section::make()
74 75 ->set_label( __( 'Content', 'elementor' ) )
76 + ->set_id( 'content' )
75 77 ->set_items( [
76 78 Inline_Editing_Control::bind_to( 'text' )
77 79 ->set_placeholder( __( 'Type your button text here', 'elementor' ) )
78 80 ->set_label( __( 'Button text', 'elementor' ) ),
@@ -145,6 +147,21 @@
145 147 protected function get_templates(): array {
146 148 return [
147 149 'elementor/elements/atomic-button' => __DIR__ . '/atomic-button.html.twig',
148 150 ];
151 + }
152 +
153 + public function render_markdown(): string {
154 + $settings = $this->get_atomic_settings();
155 + $text = wp_strip_all_tags( $settings['text'] ?? '' );
156 +
157 + if ( empty( $text ) ) {
158 + return '';
159 + }
160 +
161 + if ( ! empty( $settings['link']['href'] ) ) {
162 + return '[' . $text . '](' . esc_url( $settings['link']['href'] ) . ')';
163 + }
164 +
165 + return '**' . $text . '**';
149 166 }
150 167 }