@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | // Render the stylesheets to link elements. |
| 65 | 65 | $conditional_styles = $conditional_styles_rtl = ''; |
| 66 | 66 | if (!empty($stylesheets)) { |
| 67 | - $query_string = '?'. substr(variable_get('css_js_query_string', '0'), 0, 1); |
|
| 67 | + $query_string = '?'.substr(variable_get('css_js_query_string', '0'), 0, 1); |
|
| 68 | 68 | $base_path = base_path(); |
| 69 | 69 | foreach ($stylesheets AS $condition => $css) { |
| 70 | 70 | // Each condition requires its own set of links. |
@@ -92,17 +92,17 @@ discard block |
||
| 92 | 92 | // Save the stylesheets for later retrieval. |
| 93 | 93 | if ($conditional_styles) { |
| 94 | 94 | if (db_is_active()) { |
| 95 | - variable_set('conditional_styles_' . $theme, $conditional_styles); |
|
| 96 | - variable_set('conditional_styles_' . $theme . '_rtl', $conditional_styles_rtl); |
|
| 95 | + variable_set('conditional_styles_'.$theme, $conditional_styles); |
|
| 96 | + variable_set('conditional_styles_'.$theme.'_rtl', $conditional_styles_rtl); |
|
| 97 | 97 | } |
| 98 | 98 | else { |
| 99 | - $GLOBALS['conf']['conditional_styles_' . $theme] = $conditional_styles; |
|
| 100 | - $GLOBALS['conf']['conditional_styles_' . $theme . '_rtl'] = $conditional_styles_rtl; |
|
| 99 | + $GLOBALS['conf']['conditional_styles_'.$theme] = $conditional_styles; |
|
| 100 | + $GLOBALS['conf']['conditional_styles_'.$theme.'_rtl'] = $conditional_styles_rtl; |
|
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | elseif (db_is_active()) { |
| 104 | - variable_del('conditional_styles_' . $theme); |
|
| 105 | - variable_del('conditional_styles_' . $theme . '_rtl'); |
|
| 104 | + variable_del('conditional_styles_'.$theme); |
|
| 105 | + variable_del('conditional_styles_'.$theme.'_rtl'); |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | // Display 'edit block' for custom blocks. |
| 19 | 19 | if ($block->module == 'block') { |
| 20 | - $vars['edit_links_array']['block-edit'] = l('<span>' . t('edit block') . '</span>', 'admin/build/block/configure/' . $block->module . '/' . $block->delta, |
|
| 20 | + $vars['edit_links_array']['block-edit'] = l('<span>'.t('edit block').'</span>', 'admin/build/block/configure/'.$block->module.'/'.$block->delta, |
|
| 21 | 21 | array( |
| 22 | 22 | 'attributes' => array( |
| 23 | 23 | 'title' => t('edit the content of this block'), |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | } |
| 31 | 31 | // Display 'configure' for other blocks. |
| 32 | 32 | else { |
| 33 | - $vars['edit_links_array']['block-config'] = l('<span>' . t('configure') . '</span>', 'admin/build/block/configure/' . $block->module . '/' . $block->delta, |
|
| 33 | + $vars['edit_links_array']['block-config'] = l('<span>'.t('configure').'</span>', 'admin/build/block/configure/'.$block->module.'/'.$block->delta, |
|
| 34 | 34 | array( |
| 35 | 35 | 'attributes' => array( |
| 36 | 36 | 'title' => t('configure this block'), |
@@ -45,14 +45,14 @@ discard block |
||
| 45 | 45 | // Display 'edit view' for Views blocks. |
| 46 | 46 | if ($block->module == 'views' && user_access('administer views')) { |
| 47 | 47 | list($view_name, $view_block) = explode('-block', $block->delta); |
| 48 | - $vars['edit_links_array']['block-edit-view'] = l('<span>' . t('edit view') . '</span>', 'admin/build/views/edit/' . $view_name, |
|
| 48 | + $vars['edit_links_array']['block-edit-view'] = l('<span>'.t('edit view').'</span>', 'admin/build/views/edit/'.$view_name, |
|
| 49 | 49 | array( |
| 50 | 50 | 'attributes' => array( |
| 51 | 51 | 'title' => t('edit the view that defines this block'), |
| 52 | 52 | 'class' => 'block-edit-view', |
| 53 | 53 | ), |
| 54 | 54 | 'query' => drupal_get_destination(), |
| 55 | - 'fragment' => 'views-tab-block' . $view_block, |
|
| 55 | + 'fragment' => 'views-tab-block'.$view_block, |
|
| 56 | 56 | 'html' => TRUE, |
| 57 | 57 | ) |
| 58 | 58 | ); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | // Display 'edit menu' for Menu blocks. |
| 61 | 61 | elseif (($block->module == 'menu' || ($block->module == 'user' && $block->delta == 1)) && user_access('administer menu')) { |
| 62 | 62 | $menu_name = ($block->module == 'user') ? 'navigation' : $block->delta; |
| 63 | - $vars['edit_links_array']['block-edit-menu'] = l('<span>' . t('edit menu') . '</span>', 'admin/build/menu-customize/' . $menu_name, |
|
| 63 | + $vars['edit_links_array']['block-edit-menu'] = l('<span>'.t('edit menu').'</span>', 'admin/build/menu-customize/'.$menu_name, |
|
| 64 | 64 | array( |
| 65 | 65 | 'attributes' => array( |
| 66 | 66 | 'title' => t('edit the menu that defines this block'), |
@@ -73,8 +73,8 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | // Display 'edit menu' for Menu block blocks. |
| 75 | 75 | elseif ($block->module == 'menu_block' && user_access('administer menu')) { |
| 76 | - list($menu_name, ) = split(':', variable_get("menu_block_{$block->delta}_parent", 'navigation:0')); |
|
| 77 | - $vars['edit_links_array']['block-edit-menu'] = l('<span>' . t('edit menu') . '</span>', 'admin/build/menu-customize/' . $menu_name, |
|
| 76 | + list($menu_name,) = split(':', variable_get("menu_block_{$block->delta}_parent", 'navigation:0')); |
|
| 77 | + $vars['edit_links_array']['block-edit-menu'] = l('<span>'.t('edit menu').'</span>', 'admin/build/menu-customize/'.$menu_name, |
|
| 78 | 78 | array( |
| 79 | 79 | 'attributes' => array( |
| 80 | 80 | 'title' => t('edit the menu that defines this block'), |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | function _zen_theme(&$existing, $type, $theme, $path) { |
| 13 | 13 | // Compute the conditional stylesheets. |
| 14 | 14 | if (!module_exists('conditional_styles')) { |
| 15 | - include_once './' . _zen_path() . '/zen-internals/template.conditional-styles.inc'; |
|
| 15 | + include_once './'._zen_path().'/zen-internals/template.conditional-styles.inc'; |
|
| 16 | 16 | // _conditional_styles_theme() only needs to be run once. |
| 17 | 17 | if ($theme == 'zen') { |
| 18 | 18 | _conditional_styles_theme($existing, $type, $theme, $path); |
@@ -26,9 +26,9 @@ discard block |
||
| 26 | 26 | // If we are auto-rebuilding the theme registry, warn about the feature. |
| 27 | 27 | // Always display the warning in the admin section, otherwise limit to three |
| 28 | 28 | // warnings per hour. |
| 29 | - if (function_exists('user_access') && user_access('administer site configuration') && theme_get_setting('zen_rebuild_registry') && $theme == $GLOBALS['theme'] && (arg(0) == 'admin' || flood_is_allowed($GLOBALS['theme'] . '_rebuild_registry_warning', 3))) { |
|
| 30 | - flood_register_event($GLOBALS['theme'] . '_rebuild_registry_warning'); |
|
| 31 | - drupal_set_message(t('For easier theme development, the theme registry is being rebuilt on every page request. It is <em>extremely</em> important to <a href="!link">turn off this feature</a> on production websites.', array('!link' => url('admin/build/themes/settings/' . $GLOBALS['theme']))), 'warning', FALSE); |
|
| 29 | + if (function_exists('user_access') && user_access('administer site configuration') && theme_get_setting('zen_rebuild_registry') && $theme == $GLOBALS['theme'] && (arg(0) == 'admin' || flood_is_allowed($GLOBALS['theme'].'_rebuild_registry_warning', 3))) { |
|
| 30 | + flood_register_event($GLOBALS['theme'].'_rebuild_registry_warning'); |
|
| 31 | + drupal_set_message(t('For easier theme development, the theme registry is being rebuilt on every page request. It is <em>extremely</em> important to <a href="!link">turn off this feature</a> on production websites.', array('!link' => url('admin/build/themes/settings/'.$GLOBALS['theme']))), 'warning', FALSE); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | // Keep track of all the base themes. |
@@ -40,27 +40,27 @@ discard block |
||
| 40 | 40 | foreach (array_keys($existing) as $hook) { |
| 41 | 41 | // Normally, preprocess functions are added to the registry after |
| 42 | 42 | // HOOK_theme() returns, but if we add them first, they won't be re-added. |
| 43 | - if (function_exists($theme . '_preprocess')) { |
|
| 44 | - $existing[$hook]['preprocess functions'][] = $theme . '_preprocess'; |
|
| 43 | + if (function_exists($theme.'_preprocess')) { |
|
| 44 | + $existing[$hook]['preprocess functions'][] = $theme.'_preprocess'; |
|
| 45 | 45 | } |
| 46 | - if (function_exists($theme . '_preprocess_' . $hook)) { |
|
| 47 | - $existing[$hook]['preprocess functions'][] = $theme . '_preprocess_' . $hook; |
|
| 46 | + if (function_exists($theme.'_preprocess_'.$hook)) { |
|
| 47 | + $existing[$hook]['preprocess functions'][] = $theme.'_preprocess_'.$hook; |
|
| 48 | 48 | } |
| 49 | 49 | // Add base theme process functions. |
| 50 | 50 | foreach ($base_themes as $base_theme) { |
| 51 | - if (function_exists($base_theme . '_process')) { |
|
| 52 | - $existing[$hook]['preprocess functions'][] = $base_theme . '_process'; |
|
| 51 | + if (function_exists($base_theme.'_process')) { |
|
| 52 | + $existing[$hook]['preprocess functions'][] = $base_theme.'_process'; |
|
| 53 | 53 | } |
| 54 | - if (function_exists($base_theme . '_process_' . $hook)) { |
|
| 55 | - $existing[$hook]['preprocess functions'][] = $base_theme . '_process_' . $hook; |
|
| 54 | + if (function_exists($base_theme.'_process_'.$hook)) { |
|
| 55 | + $existing[$hook]['preprocess functions'][] = $base_theme.'_process_'.$hook; |
|
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | // Add the theme process functions. |
| 59 | - if (function_exists($theme . '_process')) { |
|
| 60 | - $existing[$hook]['preprocess functions'][] = $theme . '_process'; |
|
| 59 | + if (function_exists($theme.'_process')) { |
|
| 60 | + $existing[$hook]['preprocess functions'][] = $theme.'_process'; |
|
| 61 | 61 | } |
| 62 | - if (function_exists($theme . '_process_' . $hook)) { |
|
| 63 | - $existing[$hook]['preprocess functions'][] = $theme . '_process_' . $hook; |
|
| 62 | + if (function_exists($theme.'_process_'.$hook)) { |
|
| 63 | + $existing[$hook]['preprocess functions'][] = $theme.'_process_'.$hook; |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | 'region' => array( |
| 79 | 79 | 'arguments' => array('elements' => NULL), |
| 80 | 80 | 'pattern' => 'region_', |
| 81 | - 'path' => drupal_get_path('theme', 'zen') . '/templates', |
|
| 81 | + 'path' => drupal_get_path('theme', 'zen').'/templates', |
|
| 82 | 82 | 'template' => 'region', |
| 83 | 83 | // drupal_find_theme_templates() requires this, so manually add it. |
| 84 | 84 | 'include files' => array(), |
@@ -118,13 +118,13 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | if (!module_exists('domain_theme') && !empty($defaults)) { |
| 120 | 120 | // Merge the defaults with the theme settings saved in the database. |
| 121 | - $settings = array_merge($defaults, variable_get('theme_'. $theme .'_settings', array())); |
|
| 121 | + $settings = array_merge($defaults, variable_get('theme_'.$theme.'_settings', array())); |
|
| 122 | 122 | // Save the settings back to the database. |
| 123 | 123 | if (db_is_active()) { |
| 124 | - variable_set('theme_'. $theme .'_settings', $settings); |
|
| 124 | + variable_set('theme_'.$theme.'_settings', $settings); |
|
| 125 | 125 | } |
| 126 | 126 | else { |
| 127 | - $GLOBALS['conf']['theme_'. $theme .'_settings'] = $settings; |
|
| 127 | + $GLOBALS['conf']['theme_'.$theme.'_settings'] = $settings; |
|
| 128 | 128 | } |
| 129 | 129 | // If the active theme has been loaded, force refresh of Drupal internals. |
| 130 | 130 | if (!empty($GLOBALS['theme_key'])) { |
@@ -14,25 +14,25 @@ |
||
| 14 | 14 | * If the user is silly and enables Zen as the theme, manually add some stylesheets. |
| 15 | 15 | */ |
| 16 | 16 | function _zen_preprocess_page(&$vars, $hook) { |
| 17 | - $directory = _zen_path() . '/zen-internals/css'; |
|
| 17 | + $directory = _zen_path().'/zen-internals/css'; |
|
| 18 | 18 | |
| 19 | 19 | // Add default styles. |
| 20 | 20 | if (theme_get_setting('zen_layout') == 'zen-columns-fixed') { |
| 21 | - drupal_add_css($directory . '/zen-fixed.css', 'theme', 'all'); |
|
| 21 | + drupal_add_css($directory.'/zen-fixed.css', 'theme', 'all'); |
|
| 22 | 22 | } |
| 23 | 23 | else { |
| 24 | - drupal_add_css($directory . '/zen-liquid.css', 'theme', 'all'); |
|
| 24 | + drupal_add_css($directory.'/zen-liquid.css', 'theme', 'all'); |
|
| 25 | 25 | } |
| 26 | 26 | // Add print styles. |
| 27 | - drupal_add_css($directory . '/print.css', 'theme', 'print'); |
|
| 27 | + drupal_add_css($directory.'/print.css', 'theme', 'print'); |
|
| 28 | 28 | |
| 29 | 29 | // Regenerate the stylesheets. |
| 30 | 30 | $vars['css'] = drupal_add_css(); |
| 31 | 31 | $vars['styles'] = drupal_get_css(); |
| 32 | 32 | |
| 33 | 33 | // Add IE styles. |
| 34 | - $query_string = '?'. substr(variable_get('css_js_query_string', '0'), 0, 1); |
|
| 35 | - $base_path = base_path() . $directory; |
|
| 34 | + $query_string = '?'.substr(variable_get('css_js_query_string', '0'), 0, 1); |
|
| 35 | + $base_path = base_path().$directory; |
|
| 36 | 36 | $vars['styles'] .= <<< IE_STYLES |
| 37 | 37 | <!--[if IE]><link type="text/css" rel="stylesheet" media="all" href="$base_path/ie.css$query_string" /><![endif]--> |
| 38 | 38 | <!--[if lte IE 6]><link type="text/css" rel="stylesheet" media="all" href="$base_path/ie6.css$query_string" /><![endif]--> |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $vars['created'] = $vars['date']; |
| 18 | 18 | |
| 19 | 19 | // If comment subjects are disabled, don't display them. |
| 20 | - if (variable_get('comment_subject_field_' . $vars['node']->type, 1) == 0) { |
|
| 20 | + if (variable_get('comment_subject_field_'.$vars['node']->type, 1) == 0) { |
|
| 21 | 21 | $vars['title'] = ''; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | function zen_theme(&$existing, $type, $theme, $path) { |
| 24 | 24 | // When #341140 is fixed, replace _zen_path() with drupal_get_path(). |
| 25 | - include_once './' . _zen_path() . '/zen-internals/template.theme-registry.inc'; |
|
| 25 | + include_once './'._zen_path().'/zen-internals/template.theme-registry.inc'; |
|
| 26 | 26 | return _zen_theme($existing, $type, $theme, $path); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | elseif (theme_get_setting('zen_breadcrumb_trailing')) { |
| 58 | 58 | $trailing_separator = $breadcrumb_separator; |
| 59 | 59 | } |
| 60 | - return '<div class="breadcrumb">' . implode($breadcrumb_separator, $breadcrumb) . "$trailing_separator$title</div>"; |
|
| 60 | + return '<div class="breadcrumb">'.implode($breadcrumb_separator, $breadcrumb)."$trailing_separator$title</div>"; |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | // Otherwise, return an empty string. |
@@ -106,14 +106,14 @@ discard block |
||
| 106 | 106 | 'level' => 'h2', |
| 107 | 107 | ); |
| 108 | 108 | } |
| 109 | - $output .= '<' . $heading['level']; |
|
| 109 | + $output .= '<'.$heading['level']; |
|
| 110 | 110 | if (!empty($heading['class'])) { |
| 111 | 111 | $output .= drupal_attributes(array('class' => $heading['class'])); |
| 112 | 112 | } |
| 113 | - $output .= '>' . check_plain($heading['text']) . '</' . $heading['level'] . '>'; |
|
| 113 | + $output .= '>'.check_plain($heading['text']).'</'.$heading['level'].'>'; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - $output .= '<ul'. drupal_attributes($attributes) .'>'; |
|
| 116 | + $output .= '<ul'.drupal_attributes($attributes).'>'; |
|
| 117 | 117 | |
| 118 | 118 | $num_links = count($links); |
| 119 | 119 | $i = 1; |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | && (empty($link['language']) || $link['language']->language == $language->language)) { |
| 133 | 133 | $class .= ' active'; |
| 134 | 134 | } |
| 135 | - $output .= '<li'. drupal_attributes(array('class' => $class)) .'>'; |
|
| 135 | + $output .= '<li'.drupal_attributes(array('class' => $class)).'>'; |
|
| 136 | 136 | |
| 137 | 137 | if (isset($link['href'])) { |
| 138 | 138 | // Pass in $link as $options, they share the same keys. |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | if (isset($link['attributes'])) { |
| 148 | 148 | $span_attributes = drupal_attributes($link['attributes']); |
| 149 | 149 | } |
| 150 | - $output .= '<span'. $span_attributes .'>'. $link['title'] .'</span>'; |
|
| 150 | + $output .= '<span'.$span_attributes.'>'.$link['title'].'</span>'; |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | $i++; |
@@ -169,8 +169,8 @@ discard block |
||
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | // If an item is a LOCAL TASK, render it as a tab |
| 172 | - if ($link['type'] & MENU_IS_LOCAL_TASK) { |
|
| 173 | - $link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>'; |
|
| 172 | + if ($link['type']&MENU_IS_LOCAL_TASK) { |
|
| 173 | + $link['title'] = '<span class="tab">'.check_plain($link['title']).'</span>'; |
|
| 174 | 174 | $link['localized_options']['html'] = TRUE; |
| 175 | 175 | } |
| 176 | 176 | |
@@ -195,10 +195,10 @@ discard block |
||
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | if ($primary) { |
| 198 | - $output .= '<ul class="tabs primary clearfix">' . $primary . '</ul>'; |
|
| 198 | + $output .= '<ul class="tabs primary clearfix">'.$primary.'</ul>'; |
|
| 199 | 199 | } |
| 200 | 200 | if ($secondary) { |
| 201 | - $output .= '<ul class="tabs secondary clearfix">' . $secondary . '</ul>'; |
|
| 201 | + $output .= '<ul class="tabs secondary clearfix">'.$secondary.'</ul>'; |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | return $output; |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | $elements['#region'] = $region; |
| 254 | 254 | |
| 255 | 255 | // Set the theme hook suggestions. |
| 256 | - $hook = array('region_' . $region); |
|
| 256 | + $hook = array('region_'.$region); |
|
| 257 | 257 | if (strpos($region, 'sidebar_') === 0) { |
| 258 | 258 | $hook[] = 'region_sidebar'; |
| 259 | 259 | } |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | // Views (and possibly other modules) have templates with a $classes |
| 296 | 296 | // variable that isn't a string, so we leave those variables alone. |
| 297 | 297 | if (is_string($vars[$key])) { |
| 298 | - $vars['classes_array'] = explode(' ', $hook . ' ' . $vars[$key]); |
|
| 298 | + $vars['classes_array'] = explode(' ', $hook.' '.$vars[$key]); |
|
| 299 | 299 | unset($vars[$key]); |
| 300 | 300 | } |
| 301 | 301 | } |
@@ -319,37 +319,37 @@ discard block |
||
| 319 | 319 | function zen_preprocess_page(&$vars, $hook) { |
| 320 | 320 | // If the user is silly and enables Zen as the theme, add some styles. |
| 321 | 321 | if ($GLOBALS['theme'] == 'zen') { |
| 322 | - include_once './' . _zen_path() . '/zen-internals/template.zen.inc'; |
|
| 322 | + include_once './'._zen_path().'/zen-internals/template.zen.inc'; |
|
| 323 | 323 | _zen_preprocess_page($vars, $hook); |
| 324 | 324 | } |
| 325 | 325 | // Add conditional stylesheets. |
| 326 | 326 | elseif (!module_exists('conditional_styles')) { |
| 327 | 327 | $language = $GLOBALS['language']->direction == LANGUAGE_RTL ? '_rtl' : ''; |
| 328 | - $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'] . $language, ''); |
|
| 328 | + $vars['conditional_styles'] = variable_get('conditional_styles_'.$GLOBALS['theme'].$language, ''); |
|
| 329 | 329 | $vars['styles'] .= $vars['conditional_styles']; |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | // Classes for body element. Allows advanced theming based on context |
| 333 | 333 | // (home page, node of certain type, etc.) |
| 334 | 334 | // Remove the mostly useless page-ARG0 class. |
| 335 | - if ($index = array_search(preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-'. drupal_strtolower(arg(0))), $vars['classes_array'])) { |
|
| 335 | + if ($index = array_search(preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-'.drupal_strtolower(arg(0))), $vars['classes_array'])) { |
|
| 336 | 336 | unset($vars['classes_array'][$index]); |
| 337 | 337 | } |
| 338 | 338 | if (!$vars['is_front']) { |
| 339 | 339 | // Add unique class for each page. |
| 340 | 340 | $path = drupal_get_path_alias($_GET['q']); |
| 341 | - $vars['classes_array'][] = drupal_html_class('page-' . $path); |
|
| 341 | + $vars['classes_array'][] = drupal_html_class('page-'.$path); |
|
| 342 | 342 | // Add unique class for each website section. |
| 343 | - list($section, ) = explode('/', $path, 2); |
|
| 343 | + list($section,) = explode('/', $path, 2); |
|
| 344 | 344 | if (arg(0) == 'node') { |
| 345 | 345 | if (arg(1) == 'add') { |
| 346 | 346 | $section = 'node-add'; |
| 347 | 347 | } |
| 348 | 348 | elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) { |
| 349 | - $section = 'node-' . arg(2); |
|
| 349 | + $section = 'node-'.arg(2); |
|
| 350 | 350 | } |
| 351 | 351 | } |
| 352 | - $vars['classes_array'][] = drupal_html_class('section-' . $section); |
|
| 352 | + $vars['classes_array'][] = drupal_html_class('section-'.$section); |
|
| 353 | 353 | } |
| 354 | 354 | if (theme_get_setting('zen_wireframes')) { |
| 355 | 355 | $vars['classes_array'][] = 'with-wireframes'; // Optionally add the wireframes style. |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | } |
| 377 | 377 | else { |
| 378 | 378 | $vars['classes_array'][] = 'one-sidebar'; |
| 379 | - $vars['classes_array'][] = 'sidebar-' . $vars['layout']; |
|
| 379 | + $vars['classes_array'][] = 'sidebar-'.$vars['layout']; |
|
| 380 | 380 | } |
| 381 | 381 | } |
| 382 | 382 | // Store the menu item since it has some useful information. |
@@ -406,13 +406,13 @@ discard block |
||
| 406 | 406 | function zen_preprocess_maintenance_page(&$vars, $hook) { |
| 407 | 407 | // If Zen is the maintenance theme, add some styles. |
| 408 | 408 | if ($GLOBALS['theme'] == 'zen') { |
| 409 | - include_once './' . _zen_path() . '/zen-internals/template.zen.inc'; |
|
| 409 | + include_once './'._zen_path().'/zen-internals/template.zen.inc'; |
|
| 410 | 410 | _zen_preprocess_page($vars, $hook); |
| 411 | 411 | } |
| 412 | 412 | // Add conditional stylesheets. |
| 413 | 413 | elseif (!module_exists('conditional_styles')) { |
| 414 | 414 | $language = $GLOBALS['language']->direction == LANGUAGE_RTL ? '_rtl' : ''; |
| 415 | - $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'] . $language, ''); |
|
| 415 | + $vars['conditional_styles'] = variable_get('conditional_styles_'.$GLOBALS['theme'].$language, ''); |
|
| 416 | 416 | $vars['styles'] .= $vars['conditional_styles']; |
| 417 | 417 | } |
| 418 | 418 | } |
@@ -459,11 +459,11 @@ discard block |
||
| 459 | 459 | $vars['user_picture'] = $vars['picture']; |
| 460 | 460 | |
| 461 | 461 | // Create the Drupal 7 $display_submitted variable. |
| 462 | - $vars['display_submitted'] = theme_get_setting('toggle_node_info_' . $vars['node']->type); |
|
| 462 | + $vars['display_submitted'] = theme_get_setting('toggle_node_info_'.$vars['node']->type); |
|
| 463 | 463 | |
| 464 | 464 | // Special classes for nodes. |
| 465 | 465 | // Class for node type: "node-type-page", "node-type-story", "node-type-my-custom-type", etc. |
| 466 | - $vars['classes_array'][] = drupal_html_class('node-type-' . $vars['type']); |
|
| 466 | + $vars['classes_array'][] = drupal_html_class('node-type-'.$vars['type']); |
|
| 467 | 467 | if ($vars['promote']) { |
| 468 | 468 | $vars['classes_array'][] = 'node-promoted'; |
| 469 | 469 | } |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | if (isset($vars['preview'])) { |
| 487 | 487 | $vars['classes_array'][] = 'node-preview'; |
| 488 | 488 | } |
| 489 | - $vars['classes_array'][] = 'build-mode-' . $vars['build_mode'] ; |
|
| 489 | + $vars['classes_array'][] = 'build-mode-'.$vars['build_mode']; |
|
| 490 | 490 | } |
| 491 | 491 | |
| 492 | 492 | /** |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | * The name of the template being rendered ("comment" in this case.) |
| 499 | 499 | */ |
| 500 | 500 | function zen_preprocess_comment(&$vars, $hook) { |
| 501 | - include_once './' . _zen_path() . '/zen-internals/template.comment.inc'; |
|
| 501 | + include_once './'._zen_path().'/zen-internals/template.comment.inc'; |
|
| 502 | 502 | _zen_preprocess_comment($vars, $hook); |
| 503 | 503 | } |
| 504 | 504 | |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | $vars['region'] = $vars['elements']['#region']; |
| 517 | 517 | |
| 518 | 518 | // Setup the default classes. |
| 519 | - $vars['classes_array'] = array('region', 'region-' . str_replace('_', '-', $vars['region'])); |
|
| 519 | + $vars['classes_array'] = array('region', 'region-'.str_replace('_', '-', $vars['region'])); |
|
| 520 | 520 | |
| 521 | 521 | // Sidebar regions get a couple extra classes. |
| 522 | 522 | if (strpos($vars['region'], 'sidebar_') === 0) { |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | $vars['title'] = $block->subject; |
| 543 | 543 | |
| 544 | 544 | // Special classes for blocks. |
| 545 | - $vars['classes_array'][] = 'block-' . $block->module; |
|
| 545 | + $vars['classes_array'][] = 'block-'.$block->module; |
|
| 546 | 546 | // Classes describing the position of the block within the region. |
| 547 | 547 | if ($vars['block_id'] == 1) { |
| 548 | 548 | $vars['classes_array'][] = 'first'; |
@@ -550,17 +550,17 @@ discard block |
||
| 550 | 550 | if (!function_exists('context_blocks') && count(block_list($vars['block']->region)) == $vars['block_id']) { |
| 551 | 551 | $vars['classes_array'][] = 'last'; |
| 552 | 552 | } |
| 553 | - $vars['classes_array'][] = 'region-' . $vars['block_zebra']; |
|
| 553 | + $vars['classes_array'][] = 'region-'.$vars['block_zebra']; |
|
| 554 | 554 | $vars['classes_array'][] = $vars['zebra']; |
| 555 | - $vars['classes_array'][] = 'region-count-' . $vars['block_id']; |
|
| 556 | - $vars['classes_array'][] = 'count-' . $vars['id']; |
|
| 555 | + $vars['classes_array'][] = 'region-count-'.$vars['block_id']; |
|
| 556 | + $vars['classes_array'][] = 'count-'.$vars['id']; |
|
| 557 | 557 | |
| 558 | 558 | // Create the block ID. |
| 559 | - $vars['block_html_id'] = 'block-' . $block->module . '-' . $block->delta; |
|
| 559 | + $vars['block_html_id'] = 'block-'.$block->module.'-'.$block->delta; |
|
| 560 | 560 | |
| 561 | 561 | $vars['edit_links_array'] = array(); |
| 562 | 562 | if (theme_get_setting('zen_block_editing') && user_access('administer blocks')) { |
| 563 | - include_once './' . _zen_path() . '/zen-internals/template.block-editing.inc'; |
|
| 563 | + include_once './'._zen_path().'/zen-internals/template.block-editing.inc'; |
|
| 564 | 564 | zen_preprocess_block_editing($vars, $hook); |
| 565 | 565 | $vars['classes_array'][] = 'with-block-editing'; |
| 566 | 566 | } |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | * The name of the template being rendered ("block" in this case.) |
| 591 | 591 | */ |
| 592 | 592 | function zen_process_block(&$vars, $hook) { |
| 593 | - $vars['edit_links'] = !empty($vars['edit_links_array']) ? '<div class="edit">' . implode(' ', $vars['edit_links_array']) . '</div>' : ''; |
|
| 593 | + $vars['edit_links'] = !empty($vars['edit_links_array']) ? '<div class="edit">'.implode(' ', $vars['edit_links_array']).'</div>' : ''; |
|
| 594 | 594 | } |
| 595 | 595 | |
| 596 | 596 | if (!function_exists('drupal_html_class')) { |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | // Include the definition of zen_theme_get_default_settings(). |
| 3 | -include_once './' . drupal_get_path('theme', 'zen') . '/zen-internals/template.theme-registry.inc'; |
|
| 3 | +include_once './'.drupal_get_path('theme', 'zen').'/zen-internals/template.theme-registry.inc'; |
|
| 4 | 4 | |
| 5 | 5 | |
| 6 | 6 | /** |
@@ -16,10 +16,10 @@ discard block |
||
| 16 | 16 | function zen_settings($saved_settings, $subtheme_defaults = array()) { |
| 17 | 17 | |
| 18 | 18 | // Add the form's CSS |
| 19 | - drupal_add_css(drupal_get_path('theme', 'zen') . '/zen-internals/css/theme-settings.css', 'theme'); |
|
| 19 | + drupal_add_css(drupal_get_path('theme', 'zen').'/zen-internals/css/theme-settings.css', 'theme'); |
|
| 20 | 20 | |
| 21 | 21 | // Add javascript to show/hide optional settings |
| 22 | - drupal_add_js(drupal_get_path('theme', 'zen') . '/zen-internals/js/theme-settings.js', 'theme'); |
|
| 22 | + drupal_add_js(drupal_get_path('theme', 'zen').'/zen-internals/js/theme-settings.js', 'theme'); |
|
| 23 | 23 | |
| 24 | 24 | // Get the default values from the .info file. |
| 25 | 25 | $defaults = zen_theme_get_default_settings('zen'); |
@@ -97,15 +97,15 @@ discard block |
||
| 97 | 97 | '#title' => t('Rebuild theme registry on every page.'), |
| 98 | 98 | '#default_value' => $settings['zen_rebuild_registry'], |
| 99 | 99 | '#description' => t('During theme development, it can be very useful to continuously <a href="!link">rebuild the theme registry</a>. WARNING: this is a huge performance penalty and must be turned off on production websites.', array('!link' => 'http://drupal.org/node/173880#theme-registry')), |
| 100 | - '#prefix' => '<div id="div-zen-registry"><strong>' . t('Theme registry:') . '</strong>', |
|
| 100 | + '#prefix' => '<div id="div-zen-registry"><strong>'.t('Theme registry:').'</strong>', |
|
| 101 | 101 | '#suffix' => '</div>', |
| 102 | 102 | ); |
| 103 | 103 | $form['themedev']['zen_layout'] = array( |
| 104 | 104 | '#type' => 'radios', |
| 105 | 105 | '#title' => t('Layout method'), |
| 106 | 106 | '#options' => array( |
| 107 | - 'zen-columns-liquid' => t('Liquid layout') . ' <small>(layout-liquid.css)</small>', |
|
| 108 | - 'zen-columns-fixed' => t('Fixed layout') . ' <small>(layout-fixed.css)</small>', |
|
| 107 | + 'zen-columns-liquid' => t('Liquid layout').' <small>(layout-liquid.css)</small>', |
|
| 108 | + 'zen-columns-fixed' => t('Fixed layout').' <small>(layout-fixed.css)</small>', |
|
| 109 | 109 | ), |
| 110 | 110 | '#default_value' => $settings['zen_layout'], |
| 111 | 111 | ); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | '#title' => t('Display borders around main layout elements'), |
| 115 | 115 | '#default_value' => $settings['zen_wireframes'], |
| 116 | 116 | '#description' => t('<a href="!link">Wireframes</a> are useful when prototyping a website.', array('!link' => 'http://www.boxesandarrows.com/view/html_wireframes_and_prototypes_all_gain_and_no_pain')), |
| 117 | - '#prefix' => '<div id="div-zen-wireframes"><strong>' . t('Wireframes:') . '</strong>', |
|
| 117 | + '#prefix' => '<div id="div-zen-wireframes"><strong>'.t('Wireframes:').'</strong>', |
|
| 118 | 118 | '#suffix' => '</div>', |
| 119 | 119 | ); |
| 120 | 120 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | // Include the definition of zen_settings() and zen_theme_get_default_settings(). |
| 3 | -include_once './' . drupal_get_path('theme', 'zen') . '/theme-settings.php'; |
|
| 3 | +include_once './'.drupal_get_path('theme', 'zen').'/theme-settings.php'; |
|
| 4 | 4 | |
| 5 | 5 | |
| 6 | 6 | /** |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | } |
| 41 | 41 | $error = merge_hosts($host, $newest_host); |
| 42 | 42 | if (!$error) { |
| 43 | - echo "<br>".tra("Merged %1 into %2",$host->id,$newest_host->id)."\n"; |
|
| 43 | + echo "<br>".tra("Merged %1 into %2", $host->id, $newest_host->id)."\n"; |
|
| 44 | 44 | } else { |
| 45 | 45 | echo "<br>$error\n"; |
| 46 | 46 | } |
@@ -52,10 +52,10 @@ discard block |
||
| 52 | 52 | function merge_by_name($userid) { |
| 53 | 53 | $hosts = array(); |
| 54 | 54 | $host_list = BoincHost::enum("userid=$userid"); |
| 55 | - foreach($host_list as $host) { |
|
| 55 | + foreach ($host_list as $host) { |
|
| 56 | 56 | $hosts[$host->domain_name][] = $host; |
| 57 | 57 | } |
| 58 | - foreach($hosts as $hlist) { |
|
| 58 | + foreach ($hosts as $hlist) { |
|
| 59 | 59 | merge_name($hlist); |
| 60 | 60 | } |
| 61 | 61 | } |