← All changes
|
modules/link-in-bio/base/widget-link-in-bio-base.php
+11
-29
4.2.0-dev2
→
3.23.0-beta5
View file →
| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | use Elementor\Core\Base\Traits\Shared_Widget_Controls_Trait; |
| 8 | 8 | use Elementor\Group_Control_Background; |
| 9 | 9 | use Elementor\Group_Control_Typography; |
| 10 | 10 | use Elementor\Modules\LinkInBio\Classes\Render\Core_Render; |
| 11 | +use Elementor\Modules\LinkInBio\Module as ConversionCenterModule; | |
| 11 | 12 | use Elementor\Plugin; |
| 12 | 13 | use Elementor\Repeater; |
| 13 | 14 | use Elementor\Utils; |
| 14 | 15 | use Elementor\Widget_Base; |
| @@ -16,28 +17,8 @@ | ||
| 16 | 17 | abstract class Widget_Link_In_Bio_Base extends Widget_Base { |
| 17 | 18 | |
| 18 | 19 | use Shared_Widget_Controls_Trait; |
| 19 | 20 | |
| 20 | - public function get_group_name(): string { | |
| 21 | - return 'link-in-bio'; | |
| 22 | - } | |
| 23 | - | |
| 24 | - public function get_style_depends(): array { | |
| 25 | - $widget_name = $this->get_name(); | |
| 26 | - | |
| 27 | - $style_depends = Plugin::$instance->experiments->is_feature_active( 'e_font_icon_svg' ) | |
| 28 | - ? parent::get_style_depends() | |
| 29 | - : [ 'elementor-icons-fa-solid', 'elementor-icons-fa-brands', 'elementor-icons-fa-regular' ]; | |
| 30 | - | |
| 31 | - $style_depends[] = 'widget-link-in-bio-base'; | |
| 32 | - | |
| 33 | - if ( 'link-in-bio' !== $widget_name ) { | |
| 34 | - $style_depends[] = "widget-{$widget_name}"; | |
| 35 | - } | |
| 36 | - | |
| 37 | - return $style_depends; | |
| 38 | - } | |
| 39 | - | |
| 40 | 21 | public static function get_configuration() { |
| 41 | 22 | return [ |
| 42 | 23 | 'content' => [ |
| 43 | 24 | 'identity_section' => [ |
| @@ -188,8 +169,12 @@ | ||
| 188 | 169 | 'bottom right' => esc_html__( 'Bottom Right', 'elementor' ), |
| 189 | 170 | ]; |
| 190 | 171 | } |
| 191 | 172 | |
| 173 | + public function show_in_panel(): bool { | |
| 174 | + return Plugin::$instance->experiments->is_feature_active( ConversionCenterModule::EXPERIMENT_NAME ); | |
| 175 | + } | |
| 176 | + | |
| 192 | 177 | protected function register_controls(): void { |
| 193 | 178 | |
| 194 | 179 | $this->add_content_tab(); |
| 195 | 180 | |
| @@ -223,11 +208,10 @@ | ||
| 223 | 208 | [ |
| 224 | 209 | 'type' => Controls_Manager::ALERT, |
| 225 | 210 | 'alert_type' => 'info', |
| 226 | 211 | 'content' => sprintf( |
| 227 | - /* translators: %s: Maximum number of images allowed. */ | |
| 228 | - esc_html__( 'Add up to %s Images', 'elementor' ), | |
| 229 | - '<b>' . $config['content']['image_links_section']['images_max'] . '</b>' | |
| 212 | + __( 'Add up to <b>%d</b> Images', 'elementor' ), | |
| 213 | + $config['content']['image_links_section']['images_max'] | |
| 230 | 214 | ), |
| 231 | 215 | ] |
| 232 | 216 | ); |
| 233 | 217 | } |
| @@ -311,11 +295,10 @@ | ||
| 311 | 295 | [ |
| 312 | 296 | 'type' => Controls_Manager::ALERT, |
| 313 | 297 | 'alert_type' => 'info', |
| 314 | 298 | 'content' => sprintf( |
| 315 | - /* translators: %s: Maximum number of CTA links allowed. */ | |
| 316 | - esc_html__( 'Add up to %s CTA links', 'elementor' ), | |
| 317 | - '<b>' . $config['content']['cta_section']['cta_max'] . '</b>' | |
| 299 | + __( 'Add up to <b>%d</b> CTA links', 'elementor' ), | |
| 300 | + $config['content']['cta_section']['cta_max'] | |
| 318 | 301 | ), |
| 319 | 302 | ] |
| 320 | 303 | ); |
| 321 | 304 | } |
| @@ -567,11 +550,10 @@ | ||
| 567 | 550 | [ |
| 568 | 551 | 'type' => Controls_Manager::ALERT, |
| 569 | 552 | 'alert_type' => 'info', |
| 570 | 553 | 'content' => sprintf( |
| 571 | - /* translators: %s: Maximum number of icons allowed. */ | |
| 572 | - esc_html__( 'Add up to %s icons', 'elementor' ), | |
| 573 | - '<b>' . $config['content']['icon_section']['platform']['limit'] . '</b>' | |
| 554 | + __( 'Add up to <b>%d</b> icons', 'elementor' ), | |
| 555 | + $config['content']['icon_section']['platform']['limit'] | |
| 574 | 556 | ), |
| 575 | 557 | ] |
| 576 | 558 | ); |
| 577 | 559 | } |