| @@ -7,17 +7,18 @@ | ||
| 7 | 7 | use Elementor\Plugin; |
| 8 | 8 | use Elementor\Utils; |
| 9 | 9 | |
| 10 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | - exit; // Exit if accessed directly. | |
| 11 | + exit; // Exit if accessed directly | |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | class Module extends BaseModule { |
| 15 | 15 | |
| 16 | + const EXPERIMENT_NAME = 'link-in-bio'; | |
| 16 | 17 | const WIDGET_HAS_CUSTOM_BREAKPOINTS = true; |
| 17 | 18 | |
| 18 | 19 | public function get_name(): string { |
| 19 | - return 'link-in-bio'; | |
| 20 | + return static::EXPERIMENT_NAME; | |
| 20 | 21 | } |
| 21 | 22 | |
| 22 | 23 | public function get_widgets(): array { |
| 23 | 24 | return [ |
| @@ -24,8 +25,20 @@ | ||
| 24 | 25 | 'Link_In_Bio', |
| 25 | 26 | ]; |
| 26 | 27 | } |
| 27 | 28 | |
| 29 | + // TODO: This is a hidden experiment which needs to remain enabled like this until 3.26 for pro compatibility. | |
| 30 | + public static function get_experimental_data() { | |
| 31 | + return [ | |
| 32 | + 'name' => self::EXPERIMENT_NAME, | |
| 33 | + 'title' => esc_html__( 'Link In Bio', 'elementor' ), | |
| 34 | + 'hidden' => true, | |
| 35 | + 'default' => Manager::STATE_ACTIVE, | |
| 36 | + 'release_status' => Manager::RELEASE_STATUS_STABLE, | |
| 37 | + 'mutable' => false, | |
| 38 | + ]; | |
| 39 | + } | |
| 40 | + | |
| 28 | 41 | public function __construct() { |
| 29 | 42 | parent::__construct(); |
| 30 | 43 | |
| 31 | 44 | add_action( 'elementor/frontend/after_register_styles', [ $this, 'register_styles' ] ); |
| @@ -55,9 +68,9 @@ | ||
| 55 | 68 | ); |
| 56 | 69 | } |
| 57 | 70 | } |
| 58 | 71 | |
| 59 | - private function get_widgets_style_list(): array { | |
| 72 | + private function get_widgets_style_list():array { | |
| 60 | 73 | return [ |
| 61 | 74 | 'widget-link-in-bio' => self::WIDGET_HAS_CUSTOM_BREAKPOINTS, // TODO: Remove in v3.27.0 [ED-15717] |
| 62 | 75 | 'widget-link-in-bio-base' => self::WIDGET_HAS_CUSTOM_BREAKPOINTS, |
| 63 | 76 | 'widget-link-in-bio-var-2' => ! self::WIDGET_HAS_CUSTOM_BREAKPOINTS, |