Hi,

Can I enable features in theme in .info file by putting:
features[] = logo
features[] = name
features[] = slogan
features[] = node_user_picture
features[] = comment_user_picture
features[] = comment_user_verification
features[] = favicon
features[] = main_menu
features[] = secondary_menu

but by default "unchecked" in theme ?

I want to leave this settings but unchecked that i can later re-enable them if i want.
Thx for help.
BR

Comments

Short answer is No. However

Short answer is No.
However you can add a comment (a semi colon or ";") before them to disable some. That "features" directive is a non-PHP way to say "enable/check this features by default".
You can find the relevant code under theme_get_setting:

<?php
// Turn on all default features.
   
$features = _system_default_theme_features();
    foreach (
$features as $feature) {
     
$cache[$theme]['toggle_' . $feature] = 1;
    }

  
//......
      // If the theme does not support a particular feature, override the global
      // setting and set the value to NULL.
     
if (!empty($theme_object->info['features'])) {
        foreach (
$features as $feature) {
          if (!
in_array($feature, $theme_object->info['features'])) {
           
$cache[$theme]['toggle_' . $feature] = NULL;
          }
        }
      }
?>

love, light n laughter

Yes you can do this

Yes you can do this.

All Features toggles are just theme settings, in essence, and you can of course add default values for these in the info file. So yes, the first answer (above) is wrong; you can do this.

Here is a complete list of settings for the features - you add these just after the features declarations, in this example the logo is toggled off, or 0, and all the others are on, or a 1.

When the theme is first enabled the logo will be unchecked and not show in the theme.

settings[toggle_logo] = 0
settings[toggle_name] = 1
settings[toggle_slogan] = 1
settings[toggle_node_user_picture] = 1
settings[toggle_comment_user_picture] = 1
settings[toggle_comment_user_verification] = 1
settings[toggle_favicon] = 1
settings[toggle_main_menu] = 1
settings[toggle_secondary_menu] = 1

Thanks, for more info,

Thanks, for more info, Jeff.

Just to be clear and avoid misleading, the OP is about using "features" directive.

I want to leave this settings but unchecked that i can later re-enable them if i want.

I am happy to stand corrected, but I think "no" is correct in the context of "features" ;)
When you said my reply was "wrong", I think you are distracted to your solution which is a good solution, but not about the original question.

You can't do what the OP asked with "features", CMIIW.

However those settings stuff is a perfect solution, thanks for bringing this to light.

love, light n laughter

I prefer to give solution to

I prefer to give solution to solve the OP's problem directly. When the OP is a non-native speaker I take all statements in the OP with a grain of salt and simply look at what they are trying to achieve, regardless of what they are saying, then give the correct solution strait off. I felt in this case it was quite evident what they were trying to achieve and I know the answer due to extensive work with Drupal's theme settings system. I felt your answer was wrong because it gave the impression there was no solution, at least that's how I read it.

Thx For Re!!

yes this is good, thats strange that there is no notice about this in theme dev, or i missed something. Thx and BR !!

Thx For Reply

yes this is good, thats strange that there is no notice about this in theme dev, or i missed something. Thx and BR !!

nobody click here