Set "Use the administration theme when editing or creating content" to true in install profile I am creating an installation profile, and I can succesfully download and enable my custom theme as default. The issue I am running into is the "Use the administration theme when editing or creating content" setting is disabled on a fresh install, and I always want that enabled. 


How do I enable the "Use the administration theme when editing or creating content" setting in my install profile?
What is the easiest way to find out how to configure settings like this in the future? The install profile documentation does not give any info on this, and I can't find anything in the API. 


Update: I've found this API article api document to be helpful in figuring out which fields to target.
Setting it is as simple as:

variable_set('node_admin_theme', 1);


Most (not all, but most) config settings used in Drupal are managed using a system_settings_form(), which basically takes the array keys of the elements used in that form, and saves them as variables.

So an abridged version of the theme settings form would be

function some_form($form, &amp;$form_state) {
  $form['node_admin_theme'] = array(
    '#title' =&gt; t('Use the administration theme when editing or creating content'),
    '#type' =&gt; 'checkbox',
    '#default_value' =&gt; variable_get('node_admin_theme', 0),
  );

  return system_settings_form($form);
}


When Drupal processes that form, a variable called node_admin_theme is created/updated with the appropriate value.

If you're certain a form is using system_settings_form(), finding the names of the associated variables is as easy as inspecting the elements themselves and looking at the 'name' parameter, e.g.



If you're not sure, lookup the function that defines the form and check. If it does use system_settings_form() then great, and if not you get an insight into how that form actually manages its data.