function breakpoint_get_theme_media_queries in Breakpoints 8
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'.
2 calls to breakpoint_get_theme_media_queries()
- breakpoint_group_reload_from_theme in ./
breakpoint.module - Reload breakpoint groups as they were defined in the theme.
- breakpoint_themes_enabled in ./
breakpoint.module - Implements hook_themes_enabled().
File
- ./
breakpoint.module, line 270 - 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])) {
return array();
}
$config = config($theme_key . '.breakpoints');
if ($config) {
return $config
->get();
}
return array();
}