当前位置: 首页>>代码示例>>PHP>>正文


PHP _color_page_alter函数代码示例

本文整理汇总了PHP中_color_page_alter函数的典型用法代码示例。如果您正苦于以下问题:PHP _color_page_alter函数的具体用法?PHP _color_page_alter怎么用?PHP _color_page_alter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_color_page_alter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: business_process_page

function business_process_page(&$vars)
{
    // Hook into color.module.
    if (module_exists('color')) {
        _color_page_alter($vars);
    }
}
开发者ID:barkleytech,项目名称:drupal_themes,代码行数:7,代码来源:template.php

示例2: boldy_preprocess_page

/**
 * Override or insert PHPTemplate variables into the templates.
 */
function boldy_preprocess_page(&$vars)
{
    $vars['tabs2'] = menu_secondary_local_tasks();
    // Hook into color.module
    if (module_exists('color')) {
        _color_page_alter($vars);
    }
    // Classes for body element. Allows advanced theming based on context
    // (home page, node of certain type, etc.)
    $classes = explode(' ', $vars['body_classes']);
    // Remove the mostly useless page-ARG0 class.
    if ($index = array_search(preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-' . drupal_strtolower(arg(0))), $classes)) {
        unset($classes[$index]);
    }
    if (!$vars['is_front']) {
        // Add unique class for each page.
        $path = drupal_get_path_alias($_GET['q']);
        $classes[] = boldy_id_safe('page-' . $path);
        // Add unique class for each website section.
        list($section, ) = explode('/', $path, 2);
        if (arg(0) == 'node') {
            if (arg(1) == 'add') {
                $section = 'node-add';
            } elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) {
                $section = 'node-' . arg(2);
            }
        }
        $classes[] = boldy_id_safe('section-' . $section);
    }
    $vars['body_classes_array'] = $classes;
    $vars['body_classes'] = implode(' ', $classes);
    // Concatenate with spaces.
}
开发者ID:rachellawson,项目名称:drupalsciencecamp,代码行数:36,代码来源:template.php

示例3: bartik_process_page

/**
 * Override or insert variables into the page template.
 */
function bartik_process_page(&$variables)
{
    // Hook into color.module.
    if (isset($variables['node']->type)) {
        $nodetype = $variables['node']->type;
        $variables['theme_hook_suggestions'][] = 'page__' . $nodetype;
    }
    if (module_exists('color')) {
        _color_page_alter($variables);
    }
    // Always print the site name and slogan, but if they are toggled off, we'll
    // just hide them visually.
    $variables['hide_site_name'] = theme_get_setting('toggle_name') ? FALSE : TRUE;
    $variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;
    if ($variables['hide_site_name']) {
        // If toggle_name is FALSE, the site_name will be empty, so we rebuild it.
        $variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));
    }
    if ($variables['hide_site_slogan']) {
        // If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it.
        $variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));
    }
    // Since the title and the shortcut link are both block level elements,
    // positioning them next to each other is much simpler with a wrapper div.
    if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) {
        // Add a wrapper div using the title_prefix and title_suffix render elements.
        $variables['title_prefix']['shortcut_wrapper'] = array('#markup' => '<div class="shortcut-wrapper clearfix">', '#weight' => 100);
        $variables['title_suffix']['shortcut_wrapper'] = array('#markup' => '</div>', '#weight' => -99);
        // Make sure the shortcut link is the first item in title_suffix.
        $variables['title_suffix']['add_or_remove_shortcut']['#weight'] = -100;
    }
}
开发者ID:napoleon789,项目名称:ldulich,代码行数:35,代码来源:template.php

示例4: perma_boot_process_page

function perma_boot_process_page(&$variables)
{
    // Hook into color.module.
    if (module_exists('color')) {
        _color_page_alter($variables);
    }
}
开发者ID:encircle,项目名称:Permaculture-International,代码行数:7,代码来源:template.php

示例5: custom_apim_theme_process_page

/**
 * Override or insert variables into the page template.
 */
function custom_apim_theme_process_page(&$vars)
{
    // Hook into the color module.
    if (module_exists('color')) {
        _color_page_alter($vars);
    }
}
开发者ID:jwitt-hhg,项目名称:custom_apim_theme,代码行数:10,代码来源:template.php

示例6: bartik_process_page

/**
 * Override or insert variables into the page template.
 */
function bartik_process_page(&$variables)
{
    // Hook into color.module
    if (module_exists('color')) {
        _color_page_alter($variables);
    }
}
开发者ID:smerrill,项目名称:Bartik,代码行数:10,代码来源:template.php

示例7: sky_process_page

/**
 * Override or insert variables into the page template.
 */
function sky_process_page(&$vars)
{
    // Hook into the color module.
    if (module_exists('color')) {
        _color_page_alter($vars);
    }
}
开发者ID:jayelless,项目名称:beehive,代码行数:10,代码来源:template.php

示例8: pixture_reloaded_process_page

/**
 * Override or insert variables into the page template.
 */
function pixture_reloaded_process_page(&$vars)
{
    // Hook into color.module
    if (module_exists('color')) {
        _color_page_alter($vars);
    }
}
开发者ID:aaprp,项目名称:aaprp-intl.org,代码行数:10,代码来源:template.php

示例9: Accessibility_process_page

/**
 * Override or insert variables into the page template.
 */
function Accessibility_process_page(&$variables)
{
    // Hook into color.module.
    if (module_exists('color')) {
        _color_page_alter($variables);
    }
}
开发者ID:fosstp,项目名称:drupal4school,代码行数:10,代码来源:template.php

示例10: floyd_process_page

/**
 * @file
 * template.php
 */
function floyd_process_page(&$variables)
{
    // Hook into color.module.
    if (module_exists('color')) {
        _color_page_alter($variables);
    }
    // Add information about the number of sidebars.
    if (!empty($variables['page']['sidebar_first']) && !empty($variables['page']['sidebar_second'])) {
        $variables['content_column_class'] = ' class="col-md-6"';
    } elseif (!empty($variables['page']['sidebar_first']) || !empty($variables['page']['sidebar_second'])) {
        $variables['content_column_class'] = ' class="col-md-9"';
    } else {
        $variables['content_column_class'] = ' class="col-md-12"';
    }
    if (isset($variables['title'])) {
        $variables['title'] = strip_tags(html_entity_decode($variables['title']));
    }
    if ((drupal_is_front_page() || current_path() == 'node/72' || current_path() == 'node/73') && isset($variables['title'])) {
        unset($variables['title']);
        $lat = is_null(theme_get_setting('map_lat')) ? '40.773328' : theme_get_setting('map_lat');
        $long = is_null(theme_get_setting('map_long')) ? '-73.960088' : theme_get_setting('map_long');
        drupal_add_js('http://maps.google.com/maps/api/js?sensor=true', 'external');
        $floyd_path = drupal_get_path('theme', 'floyd');
        drupal_add_js($floyd_path . '/js/gmap3.js');
        drupal_add_js("\n      function isMobile() { \n        return ('ontouchstart' in document.documentElement);\n      }\n      function init_gmap() {\n        if ( typeof google == 'undefined' ) return;\n        var styles = [\n        {\n          'featureType': 'water',\n          'stylers': [\n          {\n            'color': '#eee'\n          },\n          {\n            'visibility': 'on'\n          }\n          ]\n        },\n        {\n          'featureType': 'landscape',\n          'stylers': [\n          {\n            'color': '#f2f2f2'\n          }\n          ]\n        },\n        {\n          'featureType': 'road',\n          'stylers': [\n          {\n            'saturation': -100\n          },\n          {\n            'lightness': 45\n          }\n          ]\n        },\n        {\n          'featureType': 'road.highway',\n          'stylers': [\n          {\n            'visibility': 'simplified'\n          }\n          ]\n        },\n        {\n          'featureType': 'road.arterial',\n          'elementType': 'labels.icon',\n          'stylers': [\n          {\n            'visibility': 'off'\n          }\n          ]\n        },\n        {\n          'featureType': 'administrative',\n          'elementType': 'labels.text.fill',\n          'stylers': [\n          {\n            'color': '#444444'\n          }\n          ]\n        },\n        {\n          'featureType': 'transit',\n          'stylers': [\n          {\n            'visibility': 'off'\n          }\n          ]\n        },\n        {\n          'featureType': 'poi',\n          'stylers': [\n          {\n            'visibility': 'off'\n          }\n          ]\n        }\n       ]\n        var options = {\n          center: [" . $lat . ", " . $long . "],\n          zoom: 16,\n          mapTypeControl: false,\n          disableDefaultUI: true,\n          zoomControl: false,\n          scrollwheel: false,\n          styles: styles\n        }\n\n        if (isMobile()) {\n          options.draggable = false;\n        }\n        var pathToTheme = Drupal.settings.basePath + 'sites/all/themes/floyd';\n        var image = pathToTheme + '/images/mapicon.png';    \n\n        jQuery('#map').gmap3({\n          map: {\n            options: options\n          },\n          marker: {\n            latLng: [" . $lat . ", " . $long . "],\n            // options: { icon: image }\n          }\n        });\n      }\n      jQuery(document).ready(function() {\n        init_gmap();  \n      });\n      \n    ", 'inline');
    }
}
开发者ID:shawnaspoor,项目名称:portfolio,代码行数:31,代码来源:template.php

示例11: phptemplate_preprocess_page

/**
* Override or insert PHPTemplate variables into the templates.
*/
function phptemplate_preprocess_page(&$vars)
{
    // Hook into color.module
    if (module_exists('color')) {
        _color_page_alter($vars);
    }
}
开发者ID:hoangbktech,项目名称:bhl-bits,代码行数:10,代码来源:template.php

示例12: tundra_subtheme_process_page

/**
 * Override or insert variables into the page template.
 */
function tundra_subtheme_process_page(&$vars)
{
    // Hook into color.module.
    if (module_exists('color')) {
        _color_page_alter($vars);
    }
}
开发者ID:rlhardrock,项目名称:drupalxtr,代码行数:10,代码来源:template.php

示例13: phptemplate_preprocess_page

/**
 * Override or insert PHPTemplate variables into the templates.
 */
function phptemplate_preprocess_page(&$vars)
{
    $vars['tabs2'] = menu_secondary_local_tasks();
    // Hook into color.module
    if (module_exists('color')) {
        _color_page_alter($vars);
    }
    // handy helper for themes, not related to 404 issue
    $vars['base_path'] = base_path();
    // Only does the check if required
    if (!$vars['show_blocks']) {
        global $theme;
        $regions = system_region_list($theme);
        foreach (array_keys($regions) as $region) {
            // Only set left and right regions
            // Drupal core sets the other blocks already
            // IMHO this shows a real lack of design considerations for leaving these out!
            if ($region == 'left' || $region == 'right') {
                $blocks = theme('blocks', $region);
                if (isset($variables[$region])) {
                    $vars[$region] .= $blocks;
                } else {
                    $vars[$region] = $blocks;
                }
            }
        }
    }
}
开发者ID:himmel22,项目名称:jplesson,代码行数:31,代码来源:template.php

示例14: chamfer_process_page

function chamfer_process_page(&$variables, $hook)
{
    // Hook into color.module.
    if (module_exists('color')) {
        _color_page_alter($variables);
    }
}
开发者ID:kreynen,项目名称:elmsln,代码行数:7,代码来源:template.php

示例15: garland_process_page

/**
 * Override or insert variables into the page template.
 */
function garland_process_page(&$vars)
{
    // Hook into color.module
    if (module_exists('color')) {
        _color_page_alter($vars);
    }
}
开发者ID:blipp,项目名称:drupal,代码行数:10,代码来源:template.php


注:本文中的_color_page_alter函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。