コード例 #1
0
ファイル: template.php プロジェクト: aakb/community
/**
 * Add conditional stylesheets:
 * For more information: http://msdn.microsoft.com/en-us/library/ms537512.aspx
 * template.php implementation based on Genesis Theme by jmburnz.
 */
function kerberos_theme(&$existing, $type, $theme, $path)
{
    // Compute the conditional stylesheets.
    if (!module_exists('conditional_styles')) {
        include_once $base_path . drupal_get_path('theme', 'kerberos') . '/includes/template.conditional-styles.inc';
        // _conditional_styles_theme() only needs to be run once.
        if ($theme == 'kerberos') {
            _conditional_styles_theme($existing, $type, $theme, $path);
        }
    }
    $templates = drupal_find_theme_functions($existing, array('phptemplate', $theme));
    $templates += drupal_find_theme_templates($existing, '.tpl.php', $path);
    return $templates;
}
コード例 #2
0
ファイル: template.php プロジェクト: upei/drupal6-cms
/**
 * Implements HOOK_theme().
 * Theme FORM.
 */
function magazeen_theme(&$existing, $type, $theme, $path)
{
    // Compute the conditional stylesheets.
    if (!module_exists('conditional_styles')) {
        include_once './' . drupal_get_path('theme', 'magazeen') . '/include/template.conditional-styles.inc';
        // _conditional_styles_theme() only needs to be run once.
        if ($theme == 'magazeen') {
            _conditional_styles_theme($existing, $type, $theme, $path);
        }
    }
    // If we are auto-rebuilding the theme registry, warn about the feature.
    // Always display the warning in the admin section, otherwise limit to three
    // warnings per hour.
    if (user_access('administer site configuration') && theme_get_setting('rebuild_registry') && $theme == $GLOBALS['theme'] && (arg(0) == 'admin' || flood_is_allowed($GLOBALS['theme'] . '_rebuild_registry_warning', 3))) {
        flood_register_event($GLOBALS['theme'] . '_rebuild_registry_warning');
        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);
    }
    return array('comment_form' => array('arguments' => array('form' => NULL)));
}