Skip to main content
Tweeted twitter.com/#!/StackDrupal/status/438442295269289985
added 408 characters in body
Source Link
Krab
  • 148
  • 5

When i dpm that $vars, in classes key, there is no r_style class, whyyyy? I tried clear cache through devel module, but still the same, what i am doing wrong?

name = JH Template
core = 7.x
engine = phptemplate

styles[all][] = css/style.css
settings[bg_style] = 'r_style'

theme-settings.php

function jh_process_html(&$vars) {
    $vars['classes'] .= ' ' . theme_get_setting('bg_style');
    dpm($vars); // in classes string isn't r_style class
}

EDIT: the real question is, why theme_get_setting('bg_style') returns NULL

SOLVED: that jh_process_html function must be in template.php file, but i don't understand that drupal :D, because that function was executed even in if it was in theme-settings.php, but actually just sometimes and it causes some fails like that theme_get_setting returned null. I don't know why this happened, but it's really funny after so many years of development of drupal, this magic happened.

When i dpm that $vars, in classes key, there is no r_style class, whyyyy? I tried clear cache through devel module, but still the same, what i am doing wrong?

name = JH Template
core = 7.x
engine = phptemplate

styles[all][] = css/style.css
settings[bg_style] = 'r_style'

theme-settings.php

function jh_process_html(&$vars) {
    $vars['classes'] .= ' ' . theme_get_setting('bg_style');
    dpm($vars); // in classes string isn't r_style class
}

EDIT: the real question is, why theme_get_setting('bg_style') returns NULL

When i dpm that $vars, in classes key, there is no r_style class, whyyyy? I tried clear cache through devel module, but still the same, what i am doing wrong?

name = JH Template
core = 7.x
engine = phptemplate

styles[all][] = css/style.css
settings[bg_style] = 'r_style'

theme-settings.php

function jh_process_html(&$vars) {
    $vars['classes'] .= ' ' . theme_get_setting('bg_style');
    dpm($vars); // in classes string isn't r_style class
}

EDIT: the real question is, why theme_get_setting('bg_style') returns NULL

SOLVED: that jh_process_html function must be in template.php file, but i don't understand that drupal :D, because that function was executed even in if it was in theme-settings.php, but actually just sometimes and it causes some fails like that theme_get_setting returned null. I don't know why this happened, but it's really funny after so many years of development of drupal, this magic happened.

added 86 characters in body
Source Link
Krab
  • 148
  • 5

When i dpm that $vars, in classes key, there is no r_style class, whyyyy? I tried clear cache through devel module, but still the same, what i am doing wrong?

name = JH Template
core = 7.x
engine = phptemplate

styles[all][] = css/style.css
settings[bg_style] = 'r_style'

theme-settings.php

function jh_process_html(&$vars) {
    $vars['classes'] .= ' ' . theme_get_setting('bg_style');
    dpm($vars); // in classes string isn't r_style class
}

EDIT: the real question is, why theme_get_setting('bg_style') returns NULL

When i dpm that $vars, in classes key, there is no r_style class, whyyyy? I tried clear cache through devel module, but still the same, what i am doing wrong?

name = JH Template
core = 7.x
engine = phptemplate

styles[all][] = css/style.css
settings[bg_style] = 'r_style'

theme-settings.php

function jh_process_html(&$vars) {
    $vars['classes'] .= ' ' . theme_get_setting('bg_style');
    dpm($vars); // in classes string isn't r_style class
}

When i dpm that $vars, in classes key, there is no r_style class, whyyyy? I tried clear cache through devel module, but still the same, what i am doing wrong?

name = JH Template
core = 7.x
engine = phptemplate

styles[all][] = css/style.css
settings[bg_style] = 'r_style'

theme-settings.php

function jh_process_html(&$vars) {
    $vars['classes'] .= ' ' . theme_get_setting('bg_style');
    dpm($vars); // in classes string isn't r_style class
}

EDIT: the real question is, why theme_get_setting('bg_style') returns NULL

Source Link
Krab
  • 148
  • 5

Theme settings doesn't work

When i dpm that $vars, in classes key, there is no r_style class, whyyyy? I tried clear cache through devel module, but still the same, what i am doing wrong?

name = JH Template
core = 7.x
engine = phptemplate

styles[all][] = css/style.css
settings[bg_style] = 'r_style'

theme-settings.php

function jh_process_html(&$vars) {
    $vars['classes'] .= ' ' . theme_get_setting('bg_style');
    dpm($vars); // in classes string isn't r_style class
}