← All changes
|
modules/atomic-widgets/elements/atomic-paragraph/atomic-paragraph.php
+8
-17
4.3.0-beta3
→
4.2.1
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_V3_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; |
| @@ -39,9 +38,9 @@ | ||
| 39 | 38 | return esc_html__( 'Paragraph', 'elementor' ); |
| 40 | 39 | } |
| 41 | 40 | |
| 42 | 41 | public function get_keywords() { |
| 43 | - return [ 'ato', 'atom', 'atoms', 'atomic', 'paragraph', 'text', 'content' ]; | |
| 42 | + return [ 'ato', 'atom', 'atoms', 'atomic' ]; | |
| 44 | 43 | } |
| 45 | 44 | |
| 46 | 45 | public function get_icon() { |
| 47 | 46 | return 'eicon-paragraph'; |
| @@ -46,32 +45,24 @@ | ||
| 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() | |
| 66 | - ->default( __( 'Type your paragraph here', 'elementor' ) ) | |
| 54 | + 'paragraph' => Html_V3_Prop_Type::make() | |
| 55 | + ->default( [ | |
| 56 | + 'content' => String_Prop_Type::generate( __( 'Type your paragraph here', 'elementor' ) ), | |
| 57 | + 'children' => [], | |
| 58 | + ] ) | |
| 67 | 59 | ->description( 'The text content of the paragraph.' ) |
| 68 | 60 | ->alias( 'text', 'content' ), |
| 69 | 61 | |
| 70 | 62 | 'tag' => String_Prop_Type::make() |
| 71 | 63 | ->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.' ), | |
| 64 | + ->default( 'p' ), | |
| 74 | 65 | |
| 75 | 66 | 'link' => Link_Prop_Type::make(), |
| 76 | 67 | |
| 77 | 68 | 'attributes' => Attributes_Prop_Type::make()->meta( Overridable_Prop_Type::ignore() ), |