← All changes
|
modules/atomic-widgets/elements/atomic-youtube/atomic-youtube.php
+1
-14
4.2.0-beta1
→
3.35.8
View file →
| @@ -52,10 +52,9 @@ | ||
| 52 | 52 | 'classes' => Classes_Prop_Type::make() |
| 53 | 53 | ->default( [] ), |
| 54 | 54 | |
| 55 | 55 | 'source' => String_Prop_Type::make() |
| 56 | - ->default( 'https://www.youtube.com/watch?v=XHOmBV4js_E' ) | |
| 57 | - ->alias( 'url', 'video' ), | |
| 56 | + ->default( 'https://www.youtube.com/watch?v=XHOmBV4js_E' ), | |
| 58 | 57 | |
| 59 | 58 | 'start' => String_Prop_Type::make()->meta( Dynamic_Prop_Type::ignore() ), |
| 60 | 59 | 'end' => String_Prop_Type::make()->meta( Dynamic_Prop_Type::ignore() ), |
| 61 | 60 | 'autoplay' => Boolean_Prop_Type::make()->default( false ), |
| @@ -74,9 +73,8 @@ | ||
| 74 | 73 | protected function define_atomic_controls(): array { |
| 75 | 74 | return [ |
| 76 | 75 | Section::make() |
| 77 | 76 | ->set_label( __( 'Content', 'elementor' ) ) |
| 78 | - ->set_id( 'content' ) | |
| 79 | 77 | ->set_items( [ |
| 80 | 78 | Text_Control::bind_to( 'source' ) |
| 81 | 79 | ->set_placeholder( esc_html__( 'Type or paste your URL', 'elementor' ) ) |
| 82 | 80 | ->set_label( esc_html__( 'YouTube URL', 'elementor' ) ), |
| @@ -141,17 +139,6 @@ | ||
| 141 | 139 | protected function get_templates(): array { |
| 142 | 140 | return [ |
| 143 | 141 | 'elementor/elements/atomic-youtube' => __DIR__ . '/atomic-youtube.html.twig', |
| 144 | 142 | ]; |
| 145 | - } | |
| 146 | - | |
| 147 | - public function render_markdown(): string { | |
| 148 | - $settings = $this->get_atomic_settings(); | |
| 149 | - $url = $settings['source'] ?? ''; | |
| 150 | - | |
| 151 | - if ( empty( $url ) ) { | |
| 152 | - return ''; | |
| 153 | - } | |
| 154 | - | |
| 155 | - return '[Video](' . esc_url( $url ) . ')'; | |
| 156 | 143 | } |
| 157 | 144 | } |