| @@ -3,9 +3,8 @@ | ||
| 3 | 3 | |
| 4 | 4 | use Elementor\Core\Base\Module; |
| 5 | 5 | use Elementor\Core\Kits\Documents\Tabs\Settings_Layout; |
| 6 | 6 | use Elementor\Core\Responsive\Files\Frontend; |
| 7 | -use Elementor\Modules\DevTools\Deprecation; | |
| 8 | 7 | use Elementor\Plugin; |
| 9 | 8 | |
| 10 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | 10 | exit; // Exit if accessed directly. |
| @@ -133,9 +132,8 @@ | ||
| 133 | 132 | public function get_active_devices_list( $args = [] ) { |
| 134 | 133 | $default_args = [ |
| 135 | 134 | 'add_desktop' => true, |
| 136 | 135 | 'reverse' => false, |
| 137 | - 'desktop_first' => false, | |
| 138 | 136 | ]; |
| 139 | 137 | |
| 140 | 138 | $args = array_merge( $default_args, $args ); |
| 141 | 139 | |
| @@ -142,9 +140,9 @@ | ||
| 142 | 140 | $active_devices = array_keys( Plugin::$instance->breakpoints->get_active_breakpoints() ); |
| 143 | 141 | |
| 144 | 142 | if ( $args['add_desktop'] ) { |
| 145 | 143 | // Insert the 'desktop' device in the correct position. |
| 146 | - if ( ! $args['desktop_first'] && in_array( 'widescreen', $active_devices, true ) ) { | |
| 144 | + if ( in_array( 'widescreen', $active_devices, true ) ) { | |
| 147 | 145 | $widescreen_index = array_search( 'widescreen', $active_devices, true ); |
| 148 | 146 | |
| 149 | 147 | array_splice( $active_devices, $widescreen_index, 0, [ 'desktop' ] ); |
| 150 | 148 | } else { |
| @@ -310,24 +308,24 @@ | ||
| 310 | 308 | */ |
| 311 | 309 | public static function get_default_config() { |
| 312 | 310 | return [ |
| 313 | 311 | self::BREAKPOINT_KEY_MOBILE => [ |
| 314 | - 'label' => esc_html__( 'Mobile Portrait', 'elementor' ), | |
| 312 | + 'label' => esc_html__( 'Mobile', 'elementor' ), | |
| 315 | 313 | 'default_value' => 767, |
| 316 | 314 | 'direction' => 'max', |
| 317 | 315 | ], |
| 318 | 316 | self::BREAKPOINT_KEY_MOBILE_EXTRA => [ |
| 319 | - 'label' => esc_html__( 'Mobile Landscape', 'elementor' ), | |
| 317 | + 'label' => esc_html__( 'Mobile Extra', 'elementor' ), | |
| 320 | 318 | 'default_value' => 880, |
| 321 | 319 | 'direction' => 'max', |
| 322 | 320 | ], |
| 323 | 321 | self::BREAKPOINT_KEY_TABLET => [ |
| 324 | - 'label' => esc_html__( 'Tablet Portrait', 'elementor' ), | |
| 322 | + 'label' => esc_html__( 'Tablet', 'elementor' ), | |
| 325 | 323 | 'default_value' => 1024, |
| 326 | 324 | 'direction' => 'max', |
| 327 | 325 | ], |
| 328 | 326 | self::BREAKPOINT_KEY_TABLET_EXTRA => [ |
| 329 | - 'label' => esc_html__( 'Tablet Landscape', 'elementor' ), | |
| 327 | + 'label' => esc_html__( 'Tablet Extra', 'elementor' ), | |
| 330 | 328 | 'default_value' => 1200, |
| 331 | 329 | 'direction' => 'max', |
| 332 | 330 | ], |
| 333 | 331 | self::BREAKPOINT_KEY_LAPTOP => [ |
| @@ -523,15 +521,12 @@ | ||
| 523 | 521 | |
| 524 | 522 | $deprecated_hook = 'elementor/core/responsive/get_stylesheet_templates'; |
| 525 | 523 | $replacement_hook = 'elementor/core/breakpoints/get_stylesheet_template'; |
| 526 | 524 | |
| 527 | - /** | |
| 528 | - * @type Deprecation $deprecation_module | |
| 529 | - */ | |
| 530 | - $deprecation_module = Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation; | |
| 525 | + Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_hook( $deprecated_hook, '3.2.0', $replacement_hook ); | |
| 531 | 526 | |
| 532 | 527 | // TODO: REMOVE THIS DEPRECATED HOOK IN ELEMENTOR v3.10.0/v4.0.0 |
| 533 | - $templates = $deprecation_module->apply_deprecated_filter( $deprecated_hook, [ $templates ], '3.2.0', $replacement_hook ); | |
| 528 | + $templates = apply_filters( $deprecated_hook, $templates ); | |
| 534 | 529 | |
| 535 | 530 | return apply_filters( $replacement_hook, $templates ); |
| 536 | 531 | } |
| 537 | 532 | } |