| @@ -1,14 +1,16 @@ | ||
| 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; |
| 7 | +use Elementor\Modules\EditorAppBar\Module as AppBarModule; | |
| 6 | 8 | use Elementor\Modules\Checklist\Module as ChecklistModule; |
| 7 | 9 | use Elementor\Plugin; |
| 8 | 10 | |
| 9 | 11 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | - exit; // Exit if accessed directly. | |
| 12 | + exit; // Exit if accessed directly | |
| 11 | 13 | } |
| 12 | 14 | |
| 13 | 15 | class Model extends BaseModel { |
| 14 | 16 | |
| @@ -19,8 +21,9 @@ | ||
| 19 | 21 | * |
| 20 | 22 | * @return string The name. |
| 21 | 23 | * @since 2.8.0 |
| 22 | 24 | * @access public |
| 25 | + * | |
| 23 | 26 | */ |
| 24 | 27 | public function get_name() { |
| 25 | 28 | return 'editor-preferences'; |
| 26 | 29 | } |
| @@ -90,9 +93,9 @@ | ||
| 90 | 93 | 'label' => esc_html__( 'Width', 'elementor' ) . ' (px)', |
| 91 | 94 | 'type' => Controls_Manager::SLIDER, |
| 92 | 95 | 'range' => [ |
| 93 | 96 | 'px' => [ |
| 94 | - 'min' => 250, | |
| 97 | + 'min' => 200, | |
| 95 | 98 | 'max' => 680, |
| 96 | 99 | ], |
| 97 | 100 | ], |
| 98 | 101 | 'default' => [ |
| @@ -109,8 +112,28 @@ | ||
| 109 | 112 | 'separator' => 'before', |
| 110 | 113 | ] |
| 111 | 114 | ); |
| 112 | 115 | |
| 116 | + if ( ! Plugin::$instance->experiments->is_feature_active( AppBarModule::EXPERIMENT_NAME ) ) { | |
| 117 | + | |
| 118 | + $this->add_control( | |
| 119 | + 'default_device_view', | |
| 120 | + [ | |
| 121 | + 'label' => esc_html__( 'Default device view', 'elementor' ), | |
| 122 | + 'type' => Controls_Manager::SELECT, | |
| 123 | + 'default' => 'default', | |
| 124 | + 'options' => [ | |
| 125 | + 'default' => esc_html__( 'Default', 'elementor' ), | |
| 126 | + 'mobile' => esc_html__( 'Mobile', 'elementor' ), | |
| 127 | + 'tablet' => esc_html__( 'Tablet', 'elementor' ), | |
| 128 | + 'desktop' => esc_html__( 'Desktop', 'elementor' ), | |
| 129 | + ], | |
| 130 | + 'description' => esc_html__( 'Choose which device to display when clicking the Responsive Mode icon.', 'elementor' ), | |
| 131 | + ] | |
| 132 | + ); | |
| 133 | + | |
| 134 | + } | |
| 135 | + | |
| 113 | 136 | $this->add_control( |
| 114 | 137 | 'edit_buttons', |
| 115 | 138 | [ |
| 116 | 139 | 'label' => esc_html__( 'Show quick edit options', 'elementor' ), |
| @@ -157,14 +180,14 @@ | ||
| 157 | 180 | |
| 158 | 181 | $this->add_control( |
| 159 | 182 | ChecklistModule::VISIBILITY_SWITCH_ID, |
| 160 | 183 | [ |
| 161 | - 'label' => esc_html__( 'Show launchpad checklist', 'elementor' ), | |
| 184 | + 'label' => esc_html__( 'Launchpad Checklist', 'elementor' ), | |
| 162 | 185 | 'type' => Controls_Manager::SWITCHER, |
| 163 | - 'label_on' => esc_html__( 'Yes', 'elementor' ), | |
| 164 | - 'label_off' => esc_html__( 'No', 'elementor' ), | |
| 186 | + 'label_on' => esc_html__( 'Show', 'elementor' ), | |
| 187 | + 'label_off' => esc_html__( 'Hide', 'elementor' ), | |
| 165 | 188 | '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' ), | |
| 189 | + 'description' => esc_html__( 'Show a checklist to guide you through your first steps of website creation.', 'elementor' ), | |
| 167 | 190 | ] |
| 168 | 191 | ); |
| 169 | 192 | } |
| 170 | 193 | |