| @@ -1,9 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor\Core\Base; |
| 3 | 3 | |
| 4 | 4 | use Elementor\Plugin; |
| 5 | -use Elementor\Utils; | |
| 6 | 5 | |
| 7 | 6 | if ( ! defined( 'ABSPATH' ) ) { |
| 8 | 7 | exit; // Exit if accessed directly. |
| 9 | 8 | } |
| @@ -76,9 +75,9 @@ | ||
| 76 | 75 | * @since 1.7.0 |
| 77 | 76 | * @access public |
| 78 | 77 | * @static |
| 79 | 78 | * |
| 80 | - * @return $this An instance of the class. | |
| 79 | + * @return Module An instance of the class. | |
| 81 | 80 | */ |
| 82 | 81 | public static function instance() { |
| 83 | 82 | $class_name = static::class_name(); |
| 84 | 83 | |
| @@ -223,9 +222,9 @@ | ||
| 223 | 222 | final protected function get_assets_url( $file_name, $file_extension, $relative_url = null, $add_min_suffix = 'default' ) { |
| 224 | 223 | static $is_test_mode = null; |
| 225 | 224 | |
| 226 | 225 | if ( null === $is_test_mode ) { |
| 227 | - $is_test_mode = Utils::is_script_debug() || Utils::is_elementor_tests(); | |
| 226 | + $is_test_mode = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || defined( 'ELEMENTOR_TESTS' ) && ELEMENTOR_TESTS; | |
| 228 | 227 | } |
| 229 | 228 | |
| 230 | 229 | if ( ! $relative_url ) { |
| 231 | 230 | $relative_url = $this->get_assets_relative_url() . $file_extension . '/'; |
| @@ -268,9 +267,9 @@ | ||
| 268 | 267 | * |
| 269 | 268 | * @param string $file_name |
| 270 | 269 | * @param string $relative_url Optional. Default is null. |
| 271 | 270 | * @param string $add_min_suffix Optional. Default is 'default'. |
| 272 | - * @param bool $add_direction_suffix Optional. Default is `false`. | |
| 271 | + * @param bool $add_direction_suffix Optional. Default is `false` | |
| 273 | 272 | * |
| 274 | 273 | * @return string |
| 275 | 274 | */ |
| 276 | 275 | final protected function get_css_assets_url( $file_name, $relative_url = null, $add_min_suffix = 'default', $add_direction_suffix = false ) { |
| @@ -284,27 +283,8 @@ | ||
| 284 | 283 | $file_name .= $direction_suffix; |
| 285 | 284 | } |
| 286 | 285 | |
| 287 | 286 | return $this->get_assets_url( $file_name, 'css', $relative_url, $add_min_suffix ); |
| 288 | - } | |
| 289 | - | |
| 290 | - /** | |
| 291 | - * Get Frontend File URL | |
| 292 | - * | |
| 293 | - * Returns the URL for the CSS file to be loaded in the front end. If requested via the second parameter, a custom | |
| 294 | - * file is generated based on a passed template file name. Otherwise, the URL for the default CSS file is returned. | |
| 295 | - * | |
| 296 | - * @since 3.24.0 | |
| 297 | - * | |
| 298 | - * @access public | |
| 299 | - * | |
| 300 | - * @param string $file_name | |
| 301 | - * @param boolean $has_custom_breakpoints | |
| 302 | - * | |
| 303 | - * @return string frontend file URL | |
| 304 | - */ | |
| 305 | - public function get_frontend_file_url( $file_name, $has_custom_breakpoints ) { | |
| 306 | - return Plugin::$instance->frontend->get_frontend_file_url( $file_name, $has_custom_breakpoints ); | |
| 307 | 287 | } |
| 308 | 288 | |
| 309 | 289 | /** |
| 310 | 290 | * Get assets base url |