function dxpr_theme_helper_preprocess_page in DXPR Theme Helper 7
Implements hook_preprocess_page().
Inject code to create the white "Theme Settings" button in the admin toolbar
File
- ./
dxpr_theme_helper.module, line 14
Code
function dxpr_theme_helper_preprocess_page(&$vars) {
global $user;
if ($user->uid == 1 || user_access('access administration pages')) {
$theme_path = drupal_get_path('theme', 'dxpr_theme');
drupal_add_js(array(
'dxpr_theme' => array(
'dxpr_themePath' => $theme_path,
),
), 'setting');
drupal_add_js(array(
'dxpr_themeDefaultTheme' => variable_get('theme_default'),
), 'setting');
drupal_add_js($theme_path . '/js/minified/' . 'dxpr-theme' . '.admin.min.js', 'file');
drupal_add_css($theme_path . '/css/' . 'dxpr-theme' . '.admin.css');
}
}