PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.0-dev4
Elementor Website Builder – more than just a page builder v3.35.0-dev4
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 4.0.8 All 454 releases
← All changes | modules/atomic-widgets/elements/atomic-paragraph/atomic-paragraph.php +4 -29 4.3.0-beta2 → 3.35.0-dev4 View file →
@@ -6,12 +6,11 @@
6 6 use Elementor\Modules\AtomicWidgets\Controls\Section;
7 7 use Elementor\Modules\AtomicWidgets\Controls\Types\Link_Control;
8 8 use Elementor\Modules\AtomicWidgets\Controls\Types\Select_Control;
9 9 use Elementor\Modules\AtomicWidgets\Elements\Base\Has_Template;
10 -use Elementor\Modules\AtomicWidgets\Elements\Base\Html_Tag_Computer;
11 10 use Elementor\Modules\AtomicWidgets\PropTypes\Classes_Prop_Type;
12 11 use Elementor\Modules\AtomicWidgets\PropTypes\Attributes_Prop_Type;
13 -use Elementor\Modules\AtomicWidgets\PropTypes\Escaped_Html_Prop_Type;
12 +use Elementor\Modules\AtomicWidgets\PropTypes\Html_Prop_Type;
14 13 use Elementor\Modules\AtomicWidgets\PropTypes\Link_Prop_Type;
15 14 use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\String_Prop_Type;
16 15 use Elementor\Modules\AtomicWidgets\PropTypes\Size_Prop_Type;
17 16 use Elementor\Modules\AtomicWidgets\Styles\Style_Definition;
@@ -46,32 +45,20 @@
46 45 public function get_icon() {
47 46 return 'eicon-paragraph';
48 47 }
49 48
50 - public static function html_tag_follows_link(): bool {
51 - return false;
52 - }
53 -
54 - public static function get_computed_html_tag( array $settings ): string {
55 - return Html_Tag_Computer::compute( $settings, 'p', [
56 - Html_Tag_Computer::FOLLOW_LINK_OPTION => static::html_tag_follows_link(),
57 - ] );
58 - }
59 -
60 49 protected static function define_props_schema(): array {
61 50 return [
62 51 'classes' => Classes_Prop_Type::make()
63 52 ->default( [] ),
64 53
65 - 'paragraph' => Escaped_Html_Prop_Type::make()
54 + 'paragraph' => Html_Prop_Type::make()
66 55 ->default( __( 'Type your paragraph here', 'elementor' ) )
67 - ->description( 'The text content of the paragraph.' )
68 - ->alias( 'text', 'content' ),
56 + ->description( 'The text content of the paragraph.' ),
69 57
70 58 'tag' => String_Prop_Type::make()
71 59 ->enum( [ 'p', 'span' ] )
72 - ->default( 'p' )
73 - ->description( 'The HTML tag for the paragraph element. One of: p or span. Do not use heading or div tags.' ),
60 + ->default( 'p' ),
74 61
75 62 'link' => Link_Prop_Type::make(),
76 63
77 64 'attributes' => Attributes_Prop_Type::make()->meta( Overridable_Prop_Type::ignore() ),
@@ -81,9 +68,8 @@
81 68 protected function define_atomic_controls(): array {
82 69 return [
83 70 Section::make()
84 71 ->set_label( __( 'Content', 'elementor' ) )
85 - ->set_id( 'content' )
86 72 ->set_items( [
87 73 Inline_Editing_Control::bind_to( 'paragraph' )
88 74 ->set_placeholder( __( 'Type your paragraph here', 'elementor' ) )
89 75 ->set_label( __( 'Paragraph', 'elementor' ) ),
@@ -145,17 +131,6 @@
145 131 protected function get_templates(): array {
146 132 return [
147 133 'elementor/elements/atomic-paragraph' => __DIR__ . '/atomic-paragraph.html.twig',
148 134 ];
149 - }
150 -
151 - public function render_markdown(): string {
152 - $settings = $this->get_atomic_settings();
153 - $content = $settings['paragraph'] ?? '';
154 -
155 - if ( empty( $content ) ) {
156 - return '';
157 - }
158 -
159 - return \Elementor\Modules\MarkdownRender\Html_To_Markdown::convert( $content );
160 135 }
161 136 }