| @@ -1,8 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor\Core\Responsive; |
| 3 | 3 | |
| 4 | -use Elementor\Core\Responsive\Files\Frontend; | |
| 4 | +use Elementor\Core\Breakpoints\Manager as Breakpoints_Manager; | |
| 5 | +use Elementor\Modules\DevTools\Deprecation; | |
| 5 | 6 | use Elementor\Plugin; |
| 6 | 7 | |
| 7 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 8 | 9 | exit; // Exit if accessed directly. |
| @@ -14,8 +15,9 @@ | ||
| 14 | 15 | * Elementor responsive handler class is responsible for setting up Elementor |
| 15 | 16 | * responsive breakpoints. |
| 16 | 17 | * |
| 17 | 18 | * @since 1.0.0 |
| 19 | + * @deprecated 3.2.0 | |
| 18 | 20 | */ |
| 19 | 21 | class Responsive { |
| 20 | 22 | |
| 21 | 23 | /** |
| @@ -85,8 +87,10 @@ | ||
| 85 | 87 | * |
| 86 | 88 | * @return array Editable breakpoints. |
| 87 | 89 | */ |
| 88 | 90 | public static function get_editable_breakpoints() { |
| 91 | + Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( __METHOD__, '3.2.0' ); | |
| 92 | + | |
| 89 | 93 | return array_intersect_key( self::get_breakpoints(), array_flip( self::$editable_breakpoints_keys ) ); |
| 90 | 94 | } |
| 91 | 95 | |
| 92 | 96 | /** |
| @@ -121,8 +125,10 @@ | ||
| 121 | 125 | * @access public |
| 122 | 126 | * @static |
| 123 | 127 | */ |
| 124 | 128 | public static function has_custom_breakpoints() { |
| 129 | + Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( __METHOD__, '3.2.0', 'Plugin::$instance->breakpoints->has_custom_breakpoints()' ); | |
| 130 | + | |
| 125 | 131 | return ! ! array_diff( self::$default_breakpoints, self::get_breakpoints() ); |
| 126 | 132 | } |
| 127 | 133 | |
| 128 | 134 | /** |
| @@ -130,9 +136,11 @@ | ||
| 130 | 136 | * @access public |
| 131 | 137 | * @static |
| 132 | 138 | */ |
| 133 | 139 | public static function get_stylesheet_templates_path() { |
| 134 | - return ELEMENTOR_ASSETS_PATH . 'css/templates/'; | |
| 140 | + Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( __METHOD__, '3.2.0', 'Elementor\Core\Breakpoints\Manager::get_stylesheet_templates_path()' ); | |
| 141 | + | |
| 142 | + return Breakpoints_Manager::get_stylesheet_templates_path(); | |
| 135 | 143 | } |
| 136 | 144 | |
| 137 | 145 | /** |
| 138 | 146 | * @since 2.1.0 |
| @@ -139,30 +147,9 @@ | ||
| 139 | 147 | * @access public |
| 140 | 148 | * @static |
| 141 | 149 | */ |
| 142 | 150 | public static function compile_stylesheet_templates() { |
| 143 | - foreach ( self::get_stylesheet_templates() as $file_name => $template_path ) { | |
| 144 | - $file = new Frontend( $file_name, $template_path ); | |
| 151 | + Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( __METHOD__, '3.2.0', 'Elementor\Core\Breakpoints\Manager::compile_stylesheet_templates()' ); | |
| 145 | 152 | |
| 146 | - $file->update(); | |
| 147 | - } | |
| 148 | - } | |
| 149 | - | |
| 150 | - /** | |
| 151 | - * @since 2.1.0 | |
| 152 | - * @access private | |
| 153 | - * @static | |
| 154 | - */ | |
| 155 | - private static function get_stylesheet_templates() { | |
| 156 | - $templates_paths = glob( self::get_stylesheet_templates_path() . '*.css' ); | |
| 157 | - | |
| 158 | - $templates = []; | |
| 159 | - | |
| 160 | - foreach ( $templates_paths as $template_path ) { | |
| 161 | - $file_name = 'custom-' . basename( $template_path ); | |
| 162 | - | |
| 163 | - $templates[ $file_name ] = $template_path; | |
| 164 | - } | |
| 165 | - | |
| 166 | - return apply_filters( 'elementor/core/responsive/get_stylesheet_templates', $templates ); | |
| 153 | + Breakpoints_Manager::compile_stylesheet_templates(); | |
| 167 | 154 | } |
| 168 | 155 | } |