function breakpoint_get_theme_media_queries

Get a list of available breakpoints from a specified theme.

Parameters

string $theme_key: The name of the theme.

Return value

array An array of breakpoints in the form $breakpoint['name'] = 'media query'.

1 call to breakpoint_get_theme_media_queries()
_breakpoint_theme_enabled in drupal/core/modules/breakpoint/breakpoint.module
Import breakpoints from all new enabled themes.

File

drupal/core/modules/breakpoint/breakpoint.module, line 257
Manage breakpoints and breakpoint groups for responsive designs.

Code

function breakpoint_get_theme_media_queries($theme_key) {
  $themes = list_themes();
  if (!isset($themes[$theme_key])) {
    throw new \Exception('Illegal theme_key passed.');
  }
  $config = config($theme_key . '.breakpoints');
  if ($config) {
    return $config
      ->get();
  }
  return array();
}