| @@ -1,14 +1,15 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | namespace Elementor\Core\Settings\EditorPreferences; |
| 3 | 4 | |
| 4 | 5 | use Elementor\Controls_Manager; |
| 5 | 6 | use Elementor\Core\Settings\Base\Model as BaseModel; |
| 6 | -use Elementor\Modules\Checklist\Module as ChecklistModule; | |
| 7 | +use Elementor\Modules\EditorAppBar\Module as AppBarModule; | |
| 7 | 8 | use Elementor\Plugin; |
| 8 | 9 | |
| 9 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | - exit; // Exit if accessed directly. | |
| 11 | + exit; // Exit if accessed directly | |
| 11 | 12 | } |
| 12 | 13 | |
| 13 | 14 | class Model extends BaseModel { |
| 14 | 15 | |
| @@ -19,8 +20,9 @@ | ||
| 19 | 20 | * |
| 20 | 21 | * @return string The name. |
| 21 | 22 | * @since 2.8.0 |
| 22 | 23 | * @access public |
| 24 | + * | |
| 23 | 25 | */ |
| 24 | 26 | public function get_name() { |
| 25 | 27 | return 'editor-preferences'; |
| 26 | 28 | } |
| @@ -90,9 +92,9 @@ | ||
| 90 | 92 | 'label' => esc_html__( 'Width', 'elementor' ) . ' (px)', |
| 91 | 93 | 'type' => Controls_Manager::SLIDER, |
| 92 | 94 | 'range' => [ |
| 93 | 95 | 'px' => [ |
| 94 | - 'min' => 250, | |
| 96 | + 'min' => 200, | |
| 95 | 97 | 'max' => 680, |
| 96 | 98 | ], |
| 97 | 99 | ], |
| 98 | 100 | 'default' => [ |
| @@ -109,8 +111,28 @@ | ||
| 109 | 111 | 'separator' => 'before', |
| 110 | 112 | ] |
| 111 | 113 | ); |
| 112 | 114 | |
| 115 | + if ( ! Plugin::$instance->experiments->is_feature_active( AppBarModule::EXPERIMENT_NAME ) ) { | |
| 116 | + | |
| 117 | + $this->add_control( | |
| 118 | + 'default_device_view', | |
| 119 | + [ | |
| 120 | + 'label' => esc_html__( 'Default device view', 'elementor' ), | |
| 121 | + 'type' => Controls_Manager::SELECT, | |
| 122 | + 'default' => 'default', | |
| 123 | + 'options' => [ | |
| 124 | + 'default' => esc_html__( 'Default', 'elementor' ), | |
| 125 | + 'mobile' => esc_html__( 'Mobile', 'elementor' ), | |
| 126 | + 'tablet' => esc_html__( 'Tablet', 'elementor' ), | |
| 127 | + 'desktop' => esc_html__( 'Desktop', 'elementor' ), | |
| 128 | + ], | |
| 129 | + 'description' => esc_html__( 'Choose which device to display when clicking the Responsive Mode icon.', 'elementor' ), | |
| 130 | + ] | |
| 131 | + ); | |
| 132 | + | |
| 133 | + } | |
| 134 | + | |
| 113 | 135 | $this->add_control( |
| 114 | 136 | 'edit_buttons', |
| 115 | 137 | [ |
| 116 | 138 | 'label' => esc_html__( 'Show quick edit options', 'elementor' ), |
| @@ -143,31 +165,8 @@ | ||
| 143 | 165 | 'default' => 'yes', |
| 144 | 166 | 'description' => esc_html__( 'This refers to elements you’ve hidden in the Responsive Visibility settings.', 'elementor' ), |
| 145 | 167 | ] |
| 146 | 168 | ); |
| 147 | - | |
| 148 | - if ( ChecklistModule::should_display_checklist_toggle_control() ) { | |
| 149 | - $this->add_control( | |
| 150 | - 'get_started_heading', | |
| 151 | - [ | |
| 152 | - 'label' => esc_html__( 'Get Started', 'elementor' ), | |
| 153 | - 'type' => Controls_Manager::HEADING, | |
| 154 | - 'separator' => 'before', | |
| 155 | - ] | |
| 156 | - ); | |
| 157 | - | |
| 158 | - $this->add_control( | |
| 159 | - ChecklistModule::VISIBILITY_SWITCH_ID, | |
| 160 | - [ | |
| 161 | - 'label' => esc_html__( 'Show launchpad checklist', 'elementor' ), | |
| 162 | - 'type' => Controls_Manager::SWITCHER, | |
| 163 | - 'label_on' => esc_html__( 'Yes', 'elementor' ), | |
| 164 | - 'label_off' => esc_html__( 'No', 'elementor' ), | |
| 165 | - 'default' => Plugin::$instance->modules_manager->get_modules( 'checklist' )->is_preference_switch_on() ? 'yes' : '', | |
| 166 | - 'description' => esc_html__( 'These will guide you through the first steps of creating your site.', 'elementor' ), | |
| 167 | - ] | |
| 168 | - ); | |
| 169 | - } | |
| 170 | 169 | |
| 171 | 170 | $this->add_control( |
| 172 | 171 | 'design_system_heading', |
| 173 | 172 | [ |