PluginProbe
Elementor Website Builder – more than just a page builder / 3.2.0
Elementor Website Builder – more than just a page builder v3.2.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | includes/stylesheet.php +1 -29 3.1.43.2.0 View file →
@@ -275,36 +275,8 @@
275 275 return $style_text;
276 276 }
277 277
278 278 /**
279 - * Get device maximum value.
280 - *
281 - * Retrieve the maximum size of any given device.
282 - *
283 - * @since 1.2.0
284 - * @access private
285 - *
286 - * @throws \RangeException If max value for this device is out of range.
287 - *
288 - * @param string $device_name Device name.
289 - *
290 - * @return int
291 - */
292 - private function get_device_max_value( $device_name ) {
293 - $devices_names = array_keys( $this->devices );
294 -
295 - $device_name_index = array_search( $device_name, $devices_names );
296 -
297 - $next_index = $device_name_index + 1;
298 -
299 - if ( $next_index >= count( $devices_names ) ) {
300 - throw new \RangeException( 'Max value for this device is out of range.' );
301 - }
302 -
303 - return $this->devices[ $devices_names[ $next_index ] ] - 1;
304 - }
305 -
306 - /**
307 279 * Query to hash.
308 280 *
309 281 * Turns the media query into a hashed string that represents the query
310 282 * endpoint in the rules list.
@@ -350,9 +322,9 @@
350 322 $end_point = $query_parts[0];
351 323
352 324 $device_name = $query_parts[1];
353 325
354 - $query[ $end_point ] = 'max' === $end_point ? $this->get_device_max_value( $device_name ) : $this->devices[ $device_name ];
326 + $query[ $end_point ] = 'max' === $end_point ? $this->devices[ $device_name ] : Plugin::$instance->breakpoints->get_device_min_breakpoint( $device_name );
355 327 }
356 328
357 329 return $query;
358 330 }