← All changes
|
modules/atomic-widgets/elements/atomic-button/atomic-button.php
+1
-18
4.2.3
→
4.0.5
View file →
| @@ -53,10 +53,9 @@ | ||
| 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.' ) | |
| 58 | - ->alias( 'content', 'label' ), | |
| 57 | + ->description( 'The text displayed on the button.' ), | |
| 59 | 58 | |
| 60 | 59 | 'link' => Link_Prop_Type::make(), |
| 61 | 60 | |
| 62 | 61 | 'tag' => String_Prop_Type::make() |
| @@ -72,9 +71,8 @@ | ||
| 72 | 71 | protected function define_atomic_controls(): array { |
| 73 | 72 | return [ |
| 74 | 73 | Section::make() |
| 75 | 74 | ->set_label( __( 'Content', 'elementor' ) ) |
| 76 | - ->set_id( 'content' ) | |
| 77 | 75 | ->set_items( [ |
| 78 | 76 | Inline_Editing_Control::bind_to( 'text' ) |
| 79 | 77 | ->set_placeholder( __( 'Type your button text here', 'elementor' ) ) |
| 80 | 78 | ->set_label( __( 'Button text', 'elementor' ) ), |
| @@ -147,21 +145,6 @@ | ||
| 147 | 145 | protected function get_templates(): array { |
| 148 | 146 | return [ |
| 149 | 147 | 'elementor/elements/atomic-button' => __DIR__ . '/atomic-button.html.twig', |
| 150 | 148 | ]; |
| 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 . '**'; | |
| 166 | 149 | } |
| 167 | 150 | } |