← All changes
|
modules/atomic-widgets/elements/atomic-heading/atomic-heading.php
+0
-28
4.1.0-beta3
→
4.0.3
View file →
| @@ -153,33 +153,5 @@ | ||
| 153 | 153 | return [ |
| 154 | 154 | 'elementor/elements/atomic-heading' => __DIR__ . '/atomic-heading.html.twig', |
| 155 | 155 | ]; |
| 156 | 156 | } |
| 157 | - | |
| 158 | - public function render_markdown(): string { | |
| 159 | - $settings = $this->get_atomic_settings(); | |
| 160 | - $title = wp_strip_all_tags( $settings['title'] ?? '' ); | |
| 161 | - | |
| 162 | - if ( empty( $title ) ) { | |
| 163 | - return ''; | |
| 164 | - } | |
| 165 | - | |
| 166 | - $tag = $settings['tag'] ?? 'h2'; | |
| 167 | - $level_map = [ | |
| 168 | - 'h1' => 1, | |
| 169 | - 'h2' => 2, | |
| 170 | - 'h3' => 3, | |
| 171 | - 'h4' => 4, | |
| 172 | - 'h5' => 5, | |
| 173 | - 'h6' => 6, | |
| 174 | - ]; | |
| 175 | - $level = $level_map[ $tag ] ?? 2; | |
| 176 | - | |
| 177 | - $md = str_repeat( '#', $level ) . ' ' . $title; | |
| 178 | - | |
| 179 | - if ( ! empty( $settings['link']['href'] ) ) { | |
| 180 | - $md = str_repeat( '#', $level ) . ' [' . $title . '](' . esc_url( $settings['link']['href'] ) . ')'; | |
| 181 | - } | |
| 182 | - | |
| 183 | - return $md; | |
| 184 | - } | |
| 185 | 157 | } |