← All changes
|
modules/atomic-widgets/elements/atomic-paragraph/atomic-paragraph.php
+4
-20
4.2.0-beta1
→
3.35.8
View file →
| @@ -8,9 +8,9 @@ | ||
| 8 | 8 | use Elementor\Modules\AtomicWidgets\Controls\Types\Select_Control; |
| 9 | 9 | use Elementor\Modules\AtomicWidgets\Elements\Base\Has_Template; |
| 10 | 10 | use Elementor\Modules\AtomicWidgets\PropTypes\Classes_Prop_Type; |
| 11 | 11 | use Elementor\Modules\AtomicWidgets\PropTypes\Attributes_Prop_Type; |
| 12 | -use Elementor\Modules\AtomicWidgets\PropTypes\Html_V3_Prop_Type; | |
| 12 | +use Elementor\Modules\AtomicWidgets\PropTypes\Html_Prop_Type; | |
| 13 | 13 | use Elementor\Modules\AtomicWidgets\PropTypes\Link_Prop_Type; |
| 14 | 14 | use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\String_Prop_Type; |
| 15 | 15 | use Elementor\Modules\AtomicWidgets\PropTypes\Size_Prop_Type; |
| 16 | 16 | use Elementor\Modules\AtomicWidgets\Styles\Style_Definition; |
| @@ -50,15 +50,11 @@ | ||
| 50 | 50 | return [ |
| 51 | 51 | 'classes' => Classes_Prop_Type::make() |
| 52 | 52 | ->default( [] ), |
| 53 | 53 | |
| 54 | - 'paragraph' => Html_V3_Prop_Type::make() | |
| 55 | - ->default( [ | |
| 56 | - 'content' => String_Prop_Type::generate( __( 'Type your paragraph here', 'elementor' ) ), | |
| 57 | - 'children' => [], | |
| 58 | - ] ) | |
| 59 | - ->description( 'The text content of the paragraph.' ) | |
| 60 | - ->alias( 'text', 'content' ), | |
| 54 | + 'paragraph' => Html_Prop_Type::make() | |
| 55 | + ->default( __( 'Type your paragraph here', 'elementor' ) ) | |
| 56 | + ->description( 'The text content of the paragraph.' ), | |
| 61 | 57 | |
| 62 | 58 | 'tag' => String_Prop_Type::make() |
| 63 | 59 | ->enum( [ 'p', 'span' ] ) |
| 64 | 60 | ->default( 'p' ), |
| @@ -72,9 +68,8 @@ | ||
| 72 | 68 | protected function define_atomic_controls(): array { |
| 73 | 69 | return [ |
| 74 | 70 | Section::make() |
| 75 | 71 | ->set_label( __( 'Content', 'elementor' ) ) |
| 76 | - ->set_id( 'content' ) | |
| 77 | 72 | ->set_items( [ |
| 78 | 73 | Inline_Editing_Control::bind_to( 'paragraph' ) |
| 79 | 74 | ->set_placeholder( __( 'Type your paragraph here', 'elementor' ) ) |
| 80 | 75 | ->set_label( __( 'Paragraph', 'elementor' ) ), |
| @@ -136,17 +131,6 @@ | ||
| 136 | 131 | protected function get_templates(): array { |
| 137 | 132 | return [ |
| 138 | 133 | 'elementor/elements/atomic-paragraph' => __DIR__ . '/atomic-paragraph.html.twig', |
| 139 | 134 | ]; |
| 140 | - } | |
| 141 | - | |
| 142 | - public function render_markdown(): string { | |
| 143 | - $settings = $this->get_atomic_settings(); | |
| 144 | - $content = $settings['paragraph'] ?? ''; | |
| 145 | - | |
| 146 | - if ( empty( $content ) ) { | |
| 147 | - return ''; | |
| 148 | - } | |
| 149 | - | |
| 150 | - return \Elementor\Modules\MarkdownRender\Html_To_Markdown::convert( $content ); | |
| 151 | 135 | } |
| 152 | 136 | } |